Anyone can explain me how to use tags for assigning a code string to an #? Thanks!
How Can I Use #Tags?
Stefano_LassandroCreated:
Ok thanks!
Constants still exist in SB3 though, they just canโt be defined. For the constants the are in SB3, use them as numbers. For example:Thanks!!IF BUTTON(0) AND #A THEN 'Is the same as IF BUTTON(0) AND 16 THEN.
RESETZ$="A=0" #RESETZERO=RESETZ$And then
#RESETZEROWill this thing work?
No, not really.
This will work in SB4 if you add a CONST keyword to the constant declaration, but you can't declare your own constants at all in SB3.
CONST #RESETZERO="A=0"Note that a CONST can only be assigned a constant expression/value (not a variable or result of a function) and can only be assigned once. This is because they're compile-time constants that are intended just for giving fixed values special names. It looks like you want to associate code with a constant name though. A constant is only a value evaluated at compile so you can't do that. Use a DEF instead.
DEF RESETZERO A=0 END RESETZERO 'use as a statement