#DEFINE

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 CMM2

Syntax:
#DEFINE "replacethis", "withthis"

Description:
The program can support up to 64 #define statements and both parameters must be literal quoted strings.
The pre-processor does a simple string substitution of the "replacethis" string with the "withthis" string.
Matches within quoted strings in the program are ignored.
DEFINEs are executed in reverse order of creation so a symbol can be redefined and from that point on in the program the new definition will be active.
Case is ignored in the strings in the DEFINE directive

 

#DEFINE "FROMSTRING","print"
#DEFINE "endstring","end"
'
FROMSTRING "Hello" 'will be converted to PRINT "Hello"
'
#DEFINE "fromstring","TEXT 100,500,"
FROMSTRING "Hello" 'will be converted to TEXT 100,100,"Hello"
'
print @(0,mm.info(Fontheight))"fromstring" 'won't be converted
print ""
'
list
ENDSTRING

 

Last edited: 26 November, 2020