Re: Is there a way in Fortran to designate an integer value as integer*8 ?

Liste des GroupesRevenir à cl c 
Sujet : Re: Is there a way in Fortran to designate an integer value as integer*8 ?
De : sgk (at) *nospam* REMOVEtroutmask.apl.washington.edu (Steven G. Kargl)
Groupes : comp.lang.fortran
Date : 03. Oct 2024, 05:27:31
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vdl6fi$3jra3$2@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.145 (Duplicitous mercenary valetism; d7e168a git.gnome.org/pan2)
On Wed, 02 Oct 2024 14:30:48 -0500, Lynn McGuire wrote:

On 10/2/2024 2:00 AM, Lawrence D'Oliveiro wrote:
On Tue, 1 Oct 2024 21:58:40 -0500, Lynn McGuire wrote:
 
I need many of my integers to be integer*8 in my port to 64 bit.  In
C/C++ code, I can say 123456L to mean a long long value, generally 64
bit.  Is there a corresponding way to do this in Fortran ...
 
     integer(kind = 8), parameter :: bigval = 9223372036854775807_8
     print *, bigval
 
prints
 
     9223372036854775807
 
Thanks !
 
I was afraid of that.  I will have to put _8 in about 100,000 lines of
my F77 code.  And the future conversion to C++ will need special handling.
 

If you 100,000 lines of C++ without a trailing 'L', you would
need to add 'L' to get a long int.  You also only need to add
'_8' (or 'L') to those values that would exceed huge(1) in
magnitude as integer*4 is a proper subset of integer*8 and
Fortran does conversion when required.

--
steve


Date Sujet#  Auteur
24 May 25 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal