Deutsch   English   Français   Italiano  
<vdn6g7$3tfnc$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu>
Newsgroups: comp.lang.fortran
Subject: Re: Is there a way in Fortran to designate an integer value as
 integer*8 ?
Date: Thu, 3 Oct 2024 22:40:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <vdn6g7$3tfnc$1@dont-email.me>
References: <vdict2$339ak$1@dont-email.me> <vdir24$35104$1@dont-email.me>
	<vdk718$3bulb$1@dont-email.me> <vdl6fi$3jra3$2@dont-email.me>
	<vdlfpl$3l0f5$1@dont-email.me> <vdmbml$3p2dv$1@dont-email.me>
	<vdmrgc$3rih7$2@dont-email.me> <vdmt3e$3rq14$1@dont-email.me>
	<lm8gjvFo1sfU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 04 Oct 2024 00:40:07 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="8ff5c09d073c54f7b7c962e5431dddc2";
	logging-data="4112108"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/IseuvYOrd/HePnakGOrU+"
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
 git.gnome.org/pan2)
Cancel-Lock: sha1:Y97WBJfyjlSfYSc9qINGpUfILKc=
Bytes: 2013

On Thu, 03 Oct 2024 22:28:31 +0100, Clive Page wrote:

> On 03/10/2024 20:59, Steven G. Kargl wrote:
>> My personal recommendation would be to do a proper porting from
>> integer (aka integer*4) to integer(kind=8).  And, yes, 8 in the
>> 'kind=8' is not portable.
>> 
> 
> Yes because different compilers use different integer kind numbers for 
different purposes: at least one uses kinds 1, 2, 3, 4 for the four most 
common numbers of bytes where other compilers use 1, 2, 4, 8.   But if you 
use integer(kind=int64) this is portable.

(Although unlikely) what happens when int64 = -1?
I suppose 'integer(-1)' is portable to the extent
that a compiler will error out.

-- 
steve