range syntax for C

Bruce Blodgett uunet!apollo.com!blodgett
Thu Jan 2 07:35:50 PST 1992


Paul Eggert writes:
    >    Date: Tue, 31 Dec 91 22:28:18 -0500
    >    From: rmsagnu.ai.mit.edu (Richard Stallman)
    > 
    >    I propose the syntax `int {NBITS}' or `int {MIN...MAX}'.
    > 
    > The latter syntax won't work well, because `0...MAX' is a single preprocessor
    > token and thus the preprocessor won't expand `MAX'.

0...MAX may only be treated as a single preprocessor token due to a
sloppy specification of pp-number in the ANSI C standard.  Therefore,
adoption of the {MIN...MAX} syntax simply implies that the
specification of pp-number must be cleaned up as well.

Bruce Blodgett
blodgettaapollo.hp.com
(508) 256-0176 x4037



More information about the Numeric-interest mailing list