Regarding some of the statements, I would say:
It's a question of personal programming style.
However, I believe that, in addition to functionality, “clean” implementation is also a decisive quality criterion.
To be honest, though, I stopped imposing my coding style on others a long time ago.
Long story short:
I always use named enumerations. Advantage: You can also continue the enumerations (e.g., in include files).
A little tip on the side:
Sometimes I use macros to get all enums.
Not a complete example, just meant to show the idea behind it.
Code: Select all
EnableExplicit ; <= my favorite command!!
; ..... in the main source File .....
Enumeration EWindow 1 ; begins with 1 and ZERO is the invalid or error
#WND_Main ; <= my application window "Name" is important not the value !!
#WND_Details
#WND_Trace
EndEnumeration
Macro Lo_Window : 1 : EndMacro
Macro Hi_Window : (#PB_Compiler_EnumerationValue - 1) : EndMacro
; ..... in a different source File .....
Enumeration EWindow ; continued
#WND_DescriptionEditor ;
EndEnumeration
UndefineMacro Hi_Window : Macro Hi_Window : (#PB_Compiler_EnumerationValue - 1) : EndMacro
; ..... in a different source File .....
; ; work on all available windows ....
; For wndNumber = Lo_Window To Hi_Window
; HideWindow(wndNumber, #False) ; show all windows !!
; Next