Charles Mills write:


> #define V 5                                                            
> #define STRINGZ(a,b,c,d) printf("%d %s %s %s %s\n", V, #a, #b, #c, #d)
>    STRINGZ(The, quick, brown, fox);

> the compiler is making of it

> printf("%fox %s %s %s %s\n", 5, "The", "quick", "brown", "fox");

As I understand it, this is usual for the pre-ANSI preprocessor.

Well, not quite as pre-ANSI the # stringizing operator didn't
exist, but since it did substitute inside quotes, you didn't
always need it.

Newer compilers will do this with the -traditional option.

Many compilers now do the preprocessing as part of the compilation,
instead of as a separate step with intemediate file, as was done
traditionally.

Also, the traditional (not ANSI) preprocessor is often used
with Fortran, and some other languages (such as make) that
don't work with the ANSI version.

-- glen

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to