#DEFINE, #COMMENT

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

Syntax:
#DEFINE "replacethis", "withthis"
#COMMENT START | END

Description:
#DEFINE
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

#COMMENT
Directive to allow multi-line comments. The command must be in capitals. 
Any lines between the two commands are completely ignored and not loaded into memory

 

#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: 04 July, 2021