At 03:44 AM 8/5/2004, you wrote:
Guys

I have a very long #define in C.

#define XYZ "(a lot of text)"

Is there a way of writing it on several lines?

#define XYT \ "This is a very long "\ "string that I've put across "\ "several lines."

C and C++ let you specify a string in parts -- it will automatically join adjacent string literals into one larger string. The backslashes are line continuation escapes that should come immediately before the end-of-the-line that let the macro be specified over multiple lines.


-- Ben Combee, DTS technical lead, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to