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" 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: References: 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