ANSI C & Fortran 8x - Expand cpp to partially support generalized precision
Alan J Rosenthal
flaps at dgp.toronto.edu
Sun Mar 13 03:41:08 AEST 1988
[In editing David Hough's article below, I have taken representative
paragraphs. -ajr]
In article <44981 at sun.uucp> dgh%dgh at Sun.COM (David Hough) writes:
>Comment #26, Section 3.8.8 and 2.2.4.2: predefine generalized precision macros
>...
>__int__(p) is evaluated to the name of the smallest signed int type
>that contains all the signed p-digit integers, i. e. the interval
>[-(10**p)+1,10**p-1].
>...
Useable but not very useful. Also not sufficiently well defined. What
is its value for p > log10(LONG_MAX)? Also, your macros are very
different from all other preprocessing macros in that they don't simply
substitute to a string (with possible replacements from the arguments).
Also also, nowhere else does the preprocessor know about names of types.
>__INTEGER__(p) is evaluated to the Fortran name of the type corresponding
>to __int__(p), or to INTEGER if no Fortran compiler is supported.
>...
Since no Fortran compiler is supported by the ANSI C standard, you
can just say "INTEGER". The C standard does not mandate a separate
preprocessor, nor should it. That would be the domain of a
Preprocessor Standard. It seems like that is what you are proposing.
Perhaps you should write one, or get someone else to write one.
ajr
--
If you had eternal life, would you be able to say all the integers?
More information about the Comp.lang.c
mailing list