Its difference using capital letters or not in Enum?
#1

I dont know if use this:

PHP код:
enum infoWeed
{
    
Created,
    
IdMaria,
    
Sec,
    
Min,
    
Hour,
    
Float:pX,
    
Float:pY,
    
Float:pZ,
    
Plantby[24],
    
Status,
    
Text3D:Label,
    
ObjectID,
};
new 
WeedInfo[MAX_PLANTS][infoWeed
or this: (becouse ii seee in other scripts doing this)

[PHP]

PHP код:
enum infoWeed
{
    
createD,
    
idMaria,
    
sec,
    
min,
    
hour,
    
Float:pX,
    
Float:pY,
    
Float:pZ,
    
Plantby[24],
    
status,
    
Text3D:Label,
    
objectID,
}; 
i can use the 2 forms?
Reply
#2

There is no difference in using capitals or lowercase.
Reply
#3

Everything is case sensitive so don't cripple yourself using creAtED when you can write Created instead.
Reply
#4

Thank you all , nice info learned something new
Reply
#5

Quote:
Originally Posted by ******
Посмотреть сообщение
There is no difference, but there are conventions. So best is something like:

Код:
enum E_WHATEVER
{
    E_WHATEVER_ONE, 
    E_WHATEVER_TWO,
    E_WHATEVER_THREE,
}
This keeps enum symbols associated with the enum they came from, and avoids name collisions - since a variable can't have the same name as an enum element or a function, so it is good to use different styles for them all.
Variables in enumeration need to be in capital letters with as prefix, the enumeration's name?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)