Path: utzoo!utgpu!attcan!uunet!lll-winken!ames!ncar!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!desnoyer From: desnoyer@Apple.COM (Peter Desnoyers) Newsgroups: comp.lang.c Subject: String Constant Concatenation in MPW (ANSI) C Message-ID: <24885@apple.Apple.COM> Date: 27 Jan 89 21:02:44 GMT Organization: Apple Computer Inc, Cupertino, CA Lines: 20 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