Sujet : Re: remark on defining size of basic types
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 05. Apr 2024, 01:25:22
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uungdk$v8gp$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 05.04.2024 01:38, Lawrence D'Oliveiro wrote:
On Thu, 4 Apr 2024 15:15:26 +0200, Janis Papanagnou wrote:
Sometimes it's useful to have an unbounded or parameterized integral
data type available ...
Interestingly, Fortran (of all things) has that.
Was that the e.g. '*8' syntax? - Did it allow arbitrary lengths?
I thought you could select only from few supported ranges (like,
the C scalar types, but declared as *1, *2, *4, *8, and that's
it). (I have only faint memories about Fortran, did not use it
for long.)
In Pascal you could define subranges, but I think also only on a
fixed integral base type, and Ada seems to have a similar concept.
But GNU Awk supports multiple precision arithmetic, optionally.
(No explicit data type, though.)
I'm reluctant[*] to say that I think Cobol[**] as well has such a
feature. And I think it had no size restriction on a machine word
as the other languages mentioned above. - Is that correct?
(That language feature might have got out of fashion long ago?)
Janis
[*] Some folks here might feel offended by mentioning Cobol again.
[**] A language I never programmed myself in.