Does BlitzMax have ENUMs?

BlitzMax Forums/BlitzMax Beginners Area/Does BlitzMax have ENUMs?

Given the whole idea of enumeration is that you don't care what values they are (generally), why not just add them on the end?


Sometimes you don't care what the values are, sometimes you do. Your enums may represent an ordered list of values.

The advantage of enums is that you are giving a descriptive name to a constant value, so you don't see 'magic numbers' in your code. The other big advantage of try enums is that each enum is a specific type (just like a class or BlitzMax Type). The compiler can then check the type of the arguments to functions if they are defined to take the enum.