[ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

2.2.8 Concatenated Strings

If single or double quote characters are used, then you also have the option, a la ANSI-C syntax, of implicitly concatenating a series of them together, with intervening white space ignored.

NB You cannot use directives to alter the string content. That is,

str = "fumble"
#ifdef LATER
 "stumble"
#endif
 ;

will result in a syntax error. The preprocessing directives are not carried out by the C preprocessor. However,

str = '"fumble\n"
#ifdef LATER
" stumble\n"
#endif
';

Will work. It will enclose the ‘#ifdef LATER’ and ‘#endif’ in the string. But it may also wreak havoc with the definition processing directives. The hash characters in the first column should be disambiguated with an escape \ or join them with previous lines: "fumble\n#ifdef LATER....


This document was generated by Bruce Korb on August 21, 2015 using texi2html 1.82.

AltStyle によって変換されたページ (->オリジナル) /