An Example of what I am after:
Code: Select all
Const myvariable #ON = 1
Code: Select all
myvariable = #ON
depbugprint(myvariable)
mysecondvariable = #ON
debugprint(mysecondvariable)
- 1
- error
Idea behind this is Triple reason.
First of all, to avoid hitting reserved words. For example using something like #ON or #OFF is soemthing that I would be afraid of using since they could easily become reserved in future Hollywood versions (unless they already are).
Second is, that there can sometimes be situations when it could be handy, two silly examples that will however give you the idea:
Code: Select all
const switch1 #ON = 1
const switch2 #ON = 0
switch1 = #ON
switch2 = #ON
Code: Select all
const defcon #ALARM = 5
const microwave #ALARM = 0
table_checkforalerts = { defcon = 1, microwave = 100 }
Repeat
defcon=defcon+1
microwave=microwave-1
alert = false
foreach (table_checkforalerts, function (key, item)
if key=#ALERT then alert = true
endfunction)
until alert=true
debuprint("ALERT!")