[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
A # not Followed by Argument in a Macro

(K&R, §A12.3) The C compiler can accept a # token not followed by an argument in a macro definition. For example:
#define add1(x) #x #1 // OK, but probably not what you wanted:
// add1(abc) creates "abc"#1
#define add2(x) #x "2" // OK: add2(abc) creates "abc2"
To turn this feature on, turn off the ANSI Strict setting in the C/C++ Language Panel. If the ANSI Strict setting is on, then this extension to standard C is disabled.
See also: "ANSI Strict."
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 17, 2000