I meant the use of constants in Oxygen. They have not been properly exercised. It's really nice to have concise error reporting anyway. Thanks Mike
This works with the update:
const as sys aa=2,bb=4,cc=6,dd=8,ee=10
a=cc
select a
case aa : print "aa"
case bb : print "bb"
case cc : print "cc"
case dd : print "dd"
case ee : print "ee"
end selectConstants in OxygenBasic, unlike equates, have a specific type attributed to them, using the same entity-record as a primitive variable. When a type is not specified, the constants are assumed to be
sys integers. The same with variables.
const aa=2,bb=4,cc=6,dd=8 ...dim aa=2,bb=4,cc=6,dd=8 ...Enumerations might be useful when you want to create a series of tokens, without being concerned with assigned values.
The default starting value is 0, as with C
Enumerations can be designated a type, but it is not enforced. They are handled a equates.
enum thing aa,bb,cc,dd,ee,ff
function f(it as thing) as thing
return it
end function
print f cc '2