Re: remark on defining size of basic types

Liste des GroupesRevenir à l c 
Sujet : Re: remark on defining size of basic types
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c
Date : 05. Apr 2024, 17:07:03
Autres entêtes
Organisation : None to speak of
Message-ID : <87plv3hmqw.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Michael S <already5chosen@yahoo.com> writes:
On Fri, 5 Apr 2024 07:18:09 -0000 (UTC)
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>
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.
>
I still think that Janis asked correct questions and that you answered
misleading answers.
I had never read the Fortran-2003 Standard, however I will be very
surprised if it mandates support for integer types wider than 64 bits
(or 18 decimal digits). I would not be surprised if hard mandate is
even lower, may be only 9 digits.
Also I would be surprised if there are implementations that support
integers that are wider than 128 bits (38 digits).

I think this was the source of some confusion :

    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.

As far as I can tell, Fortran has parameterized integral types, but not
unbounded integral types.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
4 Apr 24 * remark on defining size of basic types21fir
4 Apr 24 `* Re: remark on defining size of basic types20Lawrence D'Oliveiro
4 Apr 24  `* Re: remark on defining size of basic types19fir
4 Apr 24   `* Re: remark on defining size of basic types18Lawrence D'Oliveiro
4 Apr 24    `* Re: remark on defining size of basic types17fir
4 Apr 24     `* Re: remark on defining size of basic types16Janis Papanagnou
4 Apr 24      +* Re: remark on defining size of basic types7James Kuyper
4 Apr 24      i`* Re: remark on defining size of basic types6Michael S
4 Apr 24      i +- Re: remark on defining size of basic types1Keith Thompson
5 Apr 24      i +* Re: remark on defining size of basic types2Janis Papanagnou
5 Apr 24      i i`- Re: remark on defining size of basic types1James Kuyper
5 Apr 24      i `* Re: remark on defining size of basic types2James Kuyper
5 Apr 24      i  `- Re: remark on defining size of basic types1Keith Thompson
5 Apr 24      `* Re: remark on defining size of basic types8Lawrence D'Oliveiro
5 Apr 24       +* Re: remark on defining size of basic types6Janis Papanagnou
5 Apr 24       i`* Re: remark on defining size of basic types5Lawrence D'Oliveiro
5 Apr 24       i `* Re: remark on defining size of basic types4Janis Papanagnou
5 Apr 24       i  `* Re: remark on defining size of basic types3Lawrence D'Oliveiro
5 Apr 24       i   `* Re: remark on defining size of basic types2Michael S
5 Apr 24       i    `- Re: remark on defining size of basic types1Keith Thompson
5 Apr 24       `- Re: remark on defining size of basic types1Kenny McCormack

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal