Click here to Skip to main content
16,006,531 members

Survey Results

Coding style: How do you name your local variables?   [Edit]

Survey period: 3 Apr 2006 to 9 Apr 2006

What's your convention de jour for your locals?

OptionVotes% 
Pascal Cased17110.56
camel Cased70243.36
Fixed letter prefix (eg lLocal)815.00
Hungarian prefix (eg strLocal)48229.77
Scope prefix (eg l_Local)362.22
Scope and Hungarian prefix (eg l_strLocal)1257.72

View optional text answers (100 answers)


 
GeneralRe: A mixture Pin
Ray Cassick4-Apr-06 11:51
Ray Cassick4-Apr-06 11:51 
GeneralDifferentiating between parameters and locals Pin
Chris Maunder3-Apr-06 3:38
cofounderChris Maunder3-Apr-06 3:38 
GeneralRe: Differentiating between parameters and locals Pin
Ryan Roberts3-Apr-06 4:28
Ryan Roberts3-Apr-06 4:28 
GeneralRe: Differentiating between parameters and locals Pin
majahanson3113-Apr-06 5:30
majahanson3113-Apr-06 5:30 
GeneralRe: Differentiating between parameters and locals Pin
Kevin McFarlane3-Apr-06 10:06
Kevin McFarlane3-Apr-06 10:06 
GeneralRe: Differentiating between parameters and locals Pin
Shog94-Apr-06 15:59
sitebuilderShog94-Apr-06 15:59 
GeneralRe: Differentiating between parameters and locals Pin
toxcct4-Apr-06 0:56
toxcct4-Apr-06 0:56 
GeneralRe: Differentiating between parameters and locals Pin
John R. Shaw6-Apr-06 16:44
John R. Shaw6-Apr-06 16:44 
I have used a veriaty number of naming convensions. Normaly I use the camelCase as I do not want to counfuse variable names with function names. I normaly use upper case for the first letter of a function name. If a need to destinguish a parameter from a local variable, for any reason, then I prefix it with "arg" or "par", but that is usually not required.

Lately I have been developing templates and have adopted the style used in the STL. The reason for doing that is so people who are use to looking at STL, will immediatly recognize it. The only difference is that I tend to use longer names inorder to make it clearer as to what is happening.

INTP
Every thing is relative...
GeneralEveryone seems to use a mix Pin
Gary R. Wheeler3-Apr-06 2:45
Gary R. Wheeler3-Apr-06 2:45 
GeneralRe: Everyone seems to use a mix Pin
Rob Caldecott3-Apr-06 3:04
Rob Caldecott3-Apr-06 3:04 
GeneralRe: Everyone seems to use a mix Pin
Gary R. Wheeler3-Apr-06 5:31
Gary R. Wheeler3-Apr-06 5:31 
GeneralRe: Everyone seems to use a mix Pin
Nitron3-Apr-06 3:30
Nitron3-Apr-06 3:30 
GeneralRe: Everyone seems to use a mix Pin
Gary R. Wheeler3-Apr-06 5:32
Gary R. Wheeler3-Apr-06 5:32 
GeneralRe: Everyone seems to use a mix Pin
stephenbayer3-Apr-06 9:36
stephenbayer3-Apr-06 9:36 
GeneralRe: Everyone seems to use a mix Pin
Gary R. Wheeler3-Apr-06 15:34
Gary R. Wheeler3-Apr-06 15:34 
GeneralWhy camelCased? Pin
QuiJohn3-Apr-06 2:32
QuiJohn3-Apr-06 2:32 
GeneralRe: Why camelCased? Pin
Ryan Roberts3-Apr-06 3:01
Ryan Roberts3-Apr-06 3:01 
GeneralRe: Why camelCased? Pin
QuiJohn3-Apr-06 5:59
QuiJohn3-Apr-06 5:59 
GeneralRe: Why camelCased? Pin
Ryan Roberts3-Apr-06 6:41
Ryan Roberts3-Apr-06 6:41 
GeneralRe: Why camelCased? Pin
QuiJohn3-Apr-06 6:48
QuiJohn3-Apr-06 6:48 
GeneralRe: Why camelCased? Pin
worldspawn3-Apr-06 20:59
worldspawn3-Apr-06 20:59 
GeneralRe: Why camelCased? Pin
Karl Josefsson3-Apr-06 23:09
Karl Josefsson3-Apr-06 23:09 
GeneralRe: Why camelCased? Pin
worldspawn4-Apr-06 13:41
worldspawn4-Apr-06 13:41 
GeneralRe: Why camelCased? Pin
Karl Josefsson5-Apr-06 5:33
Karl Josefsson5-Apr-06 5:33 
GeneralRe: Why camelCased? Pin
tec-goblin3-Apr-06 23:54
tec-goblin3-Apr-06 23:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.