GENERAL: DEFINING A STRING ON THE COMPILER COMMAND LINE
Information in this article applies to:
Can I use the DEFINE command line option to pass a string to my program at compile time?
Though you can't pass a complete string using the DEFINE option, you can pass individual characters.
If you want define a string, you need to break it up into individual characters, as shown below.
C51 define(VERSION="'V','e','r','s','i','o','n',' ','1','.','0','b','e','t','a'")
The symbol VERSION can then be used in your C code as follows,
#ifdef VERSION char VersionString = VERSION,0; #else char VersionString = "No Version Information"; #endif
Last Reviewed: Wednesday, February 28, 2018
of your data.