|
|
I am trying to read a text file and call macros according to the names in
the file WITHOUT using a look up table with #if #else or #switch etc.
eg:
assume the text file is: "ROTATE_LEFT","ROTATE_RIGHT",..
#macro ROTATE_LEFT()
blah blah
#end
#macro ROTATE_RIGHT()
blah blah
#end
#read (MyFile,NAME)
NAME() // call the macro ROTATE_LEFT()
- I know this is illegal but this demonstrates what I would like to do, is
there some way I can convert the text string directly to a macro
identifier?
Post a reply to this message
|
|