Jump to content

how best practice to name/call/enumerate variables


Luigi
 Share

Recommended Posts

Hi Forum,

In this doc letter "e" reference a enumerator to variables.

In second example of the function ENUM your use is very clear...

But, I have two or more listviews and I think  apropriate use a enumerator, is clear too...

How is the best practice to call this variables?

Explain:

If have ONE ListView (or table) is easy to understand:

Global Enum $eID, $eNAME, $eADDRESS
Global $aPerson[3][3]

ConsoleWrite($aPerson[1][$eID] & @LF)
ConsoleWrite($aPerson[1][$eNAME] & @LF)
ConsoleWrite($aPerson[1][$eADDRESS] & @LF)

But, if have more than one ListView (or table or anything...), that is my doubt, how is the best practice to name/call this?

Global Enum $e0_ID, $e0_NAME, $e0_ADDRESS
Global Enum $e1_ID, $e1_CAR, $e1_CAR_COLOR

Global $aPerson[3][3]
Global $aCar[3][3]

ConsoleWrite($aPerson[1][$e0_ID] & @LF)
ConsoleWrite($aPerson[1][$e0_NAME] & @LF)
ConsoleWrite($aPerson[1][$e0_ADDRESS] & @LF)

ConsoleWrite($aCar[1][$e1_ID] & @LF)
ConsoleWrite($aCar[1][$e1_CAR] & @LF)
ConsoleWrite($aCar[1][$e1_CAR_COLOR] & @LF)

Thanks, Detefon

Edited by Detefon

Visit my repository

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...