Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 652631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:17:38+00:00 2026-05-13T22:17:38+00:00

Currently I’m brushing up on my Fortran95 knowledge (don’t ask why)… I’m running in

  • 0

Currently I’m brushing up on my Fortran95 knowledge (don’t ask why)…

I’m running in to a problem though. How does one handle large integers, eg. the size of: ~700000000000

INTEGER(KIND=3) cannot hold this number.
If anyone is interested the compiler I have available is Silverfrost FTN95.

I am using the integer to run through a larger set of data.

Do you have any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:17:38+00:00Added an answer on May 13, 2026 at 10:17 pm

    The standard solution (since Fortran 95, so I assume your compiler supports it) is to use the SELECTED_INT_KIND intrinsic to probe for valid integer kinds (whose values are compiler dependent) and the HUGE intrinsic.

    • SELECTED_INT_KIND (R) returns the kind type parameter of an integer type that represents all integer values n with −10^R < n < 10^R (and returns -1 if no such type exist).
    • HUGE (K) returns the largest representable number in integer type of kind K.

    For example, on my Mac with an x86_64 processor (gfortran compiler, 64-bit mode), the following program:

      print *, selected_int_kind(1)
      print *, selected_int_kind(4)
      print *, selected_int_kind(8)
      print *, selected_int_kind(16)
      print *, selected_int_kind(32)
      print *, selected_int_kind(64)
      print *, huge(0_1)
      print *, huge(0_2)
      print *, huge(0_4)
      print *, huge(0_8)
      print *, huge(0_16)
      end
    

    outputs:

               1
               2
               4
               8
              16
              -1
      127
      32767
      2147483647
      9223372036854775807
     170141183460469231731687303715884105727
    

    which tells me that I’d use an integer(kind=8) for your job.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
currently I'm developing an app for WP7 but came across a little problem with
Currently, I have a log file of messages in one table in a MySQL
Currently I have a web service running in a tomcat (http:// localhost:8080/myApp/getUsers ). My
Currently, I don't really have a good method of debugging JavaScript in Internet Explorer and
Currently my server is running of the Tomcat 5.5.26 and JDK 1.5.15. Now I
Currently I have 2 web applications app1 and app2 running on Tomcat 6: app1
Currently, db4o does not allow indexing on the contents of collections. What object databases
Currently, the only information I have is a one-line error message in the browser's
Currently I have a dedicated server with WHM and Joomla running. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.