String Constant Concatenation in MPW (ANSI) C
Peter Desnoyers
desnoyer at Apple.COM
Sat Jan 28 07:02:44 AEST 1989
I don't seem to be able to concatenate string constants when they
are defined as macros - i.e. the following code
#define XXX "aaaaa"
printf( "I " "aaaaa" ); /* no macro */
printf( "I " XXX ); /* macro */
results in the following error:
# printf( "I " "aaaaa" ); /* macro */
# ?
### Error 24 ')' expected
[... other messages ]
The code compiles properly when "aaaaa" is used, but not when I use
the macro for "aaaaa".
Am I really not allowed to do this in ANSI C? Or is this a
bug in the MPW C compiler?
Peter Desnoyers
More information about the Comp.lang.c
mailing list