Sujet : Re: remark on defining size of basic types
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 05. Apr 2024, 08:18:09
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uuo8jg$183rs$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Pan/0.155 (Kherson; fc5a80b8)
On Fri, 5 Apr 2024 08:30:16 +0200, Janis Papanagnou wrote:
For the first question I thought you were referring to old Fortran
versions ...
I did say “has”, not “had”.
Yes, but I read that 'KIND' specification as a readable variant of the
old syntax ...
It’s parameterizable. That means it is easy to change the precision of the
type right through your code just by altering one definition.
Also, KIND participates in function overloading. That requires it to be
compile-time constant. There are also LEN parameters, which can be
dynamic, but can only be used to size arrays and strings.