On Mon, 3 Nov 2014 12:08:57 -0800, Charles Mills wrote: >Would not apply to a #define, right? A #define has no real existence. #define >A "foo" simply means "every time you encounter the token A, substitute "foo" >instead. > >So the operative syntax would be > >#define A "foo" >... >#pragma convert(codepage) >char bar[] A; >#pragma convert(pop) > >Right? > Not very right. It means that if there's a single defining occurrence of A (perhaps in a header file) but multiple applied occurrences, each applied occurrence must be bracked with convert(codepage) ... convert(pop)
I really wish CPP supported such as: #define A; \ #pragma convert(codepage); \ "foo" \ #pragma convert(pop); (like any multi-line macro) so that: char bar[] A; would expand to: char bar[] #pragma convert(codepage) "foo" #pragma convert(pop) ; I once used a language in which such gyrations were possible: macro expansion could generate preprocessor commands. It was wonderful. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
