Sujet : Re: question about nullptr
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 11. Jul 2024, 03:42:14
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6ngq6$29e0c$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Pan/0.158 (Avdiivka; )
On Mon, 8 Jul 2024 21:49:10 -0700, Andrey Tarasevich wrote:
... although, one the second thought, one can probably start a Holy War
about what a proper type-agnostic declaration of a `double` variable
should look like
double d = 0;
or
auto d = 0.0;
How about
integer, parameter :: useprec = kind(0.0d0)
real(kind = useprec) :: altitude, next_altitude, next_velocity, fuel_rate, elapsed
Not quite full generics, but useful nonetheless.
(From a program I posted on comp.lang.fortran a few weeks ago.)