beebasm
beebasm copied to clipboard
Add directive to test for symbol definition
Quoting from https://stardot.org.uk/forums/viewtopic.php?p=370117#p370117
I've been playing around with MACROs in RC2. Is there a way to do an IF on something being defined? An EXISTS or DEFINED keyword? What I want to do is...
MACRO testdefined label
foo = label+"_suffix"
IF DEFINED(EVAL(foo))
PRINT foo," exists"
ELSE
PRINT foo," doesn't exist"
ENDIF
ENDMACRO
bar_suffix = 10
testdefined bar
testdefined baz