And I wanted to try and help, but this test code doesn't work if I use a variable ("n") instead of a literal number like "1".
I assumed the macro would take the numeric value of "n" to concatenate it to the "MyLabel_" text? But it's just literally using the text "n" instead?
Code: Select all
Macro DynamicRestore(n)
MyLabel_#n
EndMacro
n=Random(3,1)
Restore DynamicRestore(1) ; Change "1" to "n" and it doesn't work?
Read.s label$
Debug label$
End
DataSection
MyLabel_1: : Data.s "MyLabel_1"
MyLabel_2: : Data.s "MyLabel_2"
MyLabel_3: : Data.s "MyLabel_3"
EndDataSection
Code: Select all
Macro test(n)
n*2
EndMacro
n=50
Debug test(n) ; Outputs 100
