Page 1 of 1

Enumeration with Support of "With"

Posted: Fri Sep 25, 2015 10:38 am
by c4s
Almost always enumerations have something common prepended, like:

Code: Select all

Enumeration
	#NAMESPACE_MY_CONSTANT_ONE
	#NAMESPACE_MY_CONSTANT_TWO
	#NAMESPACE_MY_CONSTANT_THREE
EndEnumeration
How about making it easier on the eyes (and more intuitive to modify) by introducing an extra keyword like "With". The following example would create the same constants as above:

Code: Select all

Enumeration With NAMESPACE_MY_CONSTANT_
	#ONE
	#TWO
	#THREE
EndEnumeration
By the way: When I checked if this was already requested, I noticed that there are a couple of threads for binary enumeration. Now that we have EnumerationBinary (PB5.40), they can be marked as [Implemented]. :)

Re: Enumeration with Support of "With"

Posted: Mon Dec 28, 2015 11:50 pm
by Demivec
I have no comment on the request, though it could be useful.
c4s wrote:By the way: When I checked if this was already requested, I noticed that there are a couple of threads for binary enumeration. Now that we have EnumerationBinary (PB5.40), they can be marked as [Implemented].
In case somebody wants to update them here are a few of the requests:

viewtopic.php?p=392839
viewtopic.php?f=3&t=61670
viewtopic.php?f=3&t=55506
viewtopic.php?f=3&t=52244
viewtopic.php?f=3&t=40649
viewtopic.php?f=3&t=38281
viewtopic.php?f=3&t=31142
viewtopic.php?f=3&t=23821