So you might not know that, but you can name your enumerations:
Code: Select all
Enumeration CUSTOM_TYPE
#CUSTOM_TYPE_1
#CUSTOM_TYPE_2
EndEnumeration
But unlike some other languages, you cannot use that as a custom type, ie. you cannot force values to be either #CUSTOM_TYPE_1 or #CUSTOM_TYPE_2. However, you can use macros to do that:
Code: Select all
Enumeration CUSTOM_TYPE
#CUSTOM_TYPE_1
#CUSTOM_TYPE_2
EndEnumeration
Macro CUSTOM_TYPE : i : EndMacro
Structure _Struc
int.i
custom.CUSTOM_TYPE
EndStructure
Procedure WriteCustom(custom.CUSTOM_TYPE)
; Something.
EndProcedure
Which I find pretty cool. When you have a big program with a ton of constants, you can easily identify what constants you need to use when you call a function or when you assign a value to a structured variable.