Page 2 of 2

Re: Get the bigger used enumeration [Resolved]

Posted: Sat Feb 14, 2026 1:04 pm
by Kwai chang caine
@ANDRE
I have all read the DOC you give to me, and learning several things 8)
In fact, like usually i not do like we must do :oops:
Since the begining i ALWAYS used the more simple

Code: Select all

Enumeration
 #Kcc1
 #Kcc2
 etc ..
EndEnumeration
Just when i'm forced, but very rarely

Code: Select all

Enumeration 10
 #Kcc1
 #Kcc2
 etc ..
EndEnumeration
And NEVER i use NAMESPACES i have forgotten this function :oops:

And i know it's not good, but i always mixed all the constants
All my hundreds littles or even bigs codes is like this :oops:
Because i always believe "EnumerationValue" is do for that :oops:

Code: Select all

Enumeration
 #KccConstant1
  #KccConstant2
  #Window1
  #Gadget1
  #Menu1
   #Menu2
 etc ..
EndEnumeration

Enumeration #PB_Compiler_EnumerationValue
 #Window2
 #Gadget2
EndEnumeration
It's not good, but the advantage is that never i have collisions with this system :idea:
But i understand that on a monstruous code of numerous thousands lines, it's perhaps not a good idea :mrgreen:

But now with all the explains of my forum friends 8) i have much learning, and sure i change my way to enumerate my futurs codes 8)
But the code i modify is not mine, so the problem is not the same :wink:

@AXOLOTL
Hello :D
EnableExplicit ; <= my favorite command!!
:lol: I hate it, never i use it :lol:
Sometime i regret....after one hour lost :mrgreen:
But with this...i have always notifications and MsgBox on running :evil: ..and i have already enough REAL errors with my cow pats codes :lol:

Waouhhh !! you too, you need to know the list of constants used ? 8)
Your TIP is cool, i try to remmeber it
Thanks

Re: Get the bigger used enumeration [Resolved]

Posted: Sat Feb 14, 2026 1:31 pm
by Axolotl
@KCC
Kwai chang caine wrote: Sat Feb 14, 2026 1:04 pm
EnableExplicit ; <= my favorite command!!
:lol: I hate it, never i use it :lol:
Sometime i regret....after one hour lost :mrgreen:
well, I completely understand that. And I accept it anyway. I know it's difficult to insert it retrospectively.
That's why it's one of my first commands, so to speak. And it has already saved me quite a bit of time when it comes to spelling mistakes.
Kwai chang caine wrote: Sat Feb 14, 2026 1:04 pm Waouhhh !! you too, you need to know the list of constants used ? 8)
That's why I use prefixes (like #WND_ or #GDT_ and alot more), and the autocomplete window then shows me the right group....
Kwai chang caine wrote: Sat Feb 14, 2026 1:04 pm Your TIP is cool, i try to remmeber it
I call my style defensive programming.
What I mean by that is: changes in one place must not lead to errors in another place. (Difficult to explain briefly.)

Re: Get the bigger used enumeration [Resolved]

Posted: Sat Feb 14, 2026 1:56 pm
by Kwai chang caine
What I mean by that is: changes in one place must not lead to errors in another place
It's justly that the more hard thing to do :oops: mainly if it's not your code :|