HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

what is your naming convention for vJass ?

05-08-2008, 04:28 PM#1
Troll-Brain
I'm not a dreamer i perfectly know that we can't make a perfect-and-only-one convention but we can talk about our.

For globals,structs,libraries,scopes,functions i use for the first character a capital letter like that :

Collapse JASS:
globals
    integer Inc
endglobals

For constants i use only capital letters like that :

Collapse JASS:
globals
    constant integer INC = 1
endglobals

For local and methods i use only tiny letters

i don't do anything for private and public.

what about you ?
05-08-2008, 04:39 PM#2
Alexander244
Thats what I do; just for methods I have a capital at the start of the second+ word.
05-08-2008, 05:50 PM#3
grim001
globals: ALL_CAPS

private globals intended for user configuration: LikeThis

library names: Capitalized

method names: firstWordNotCapitalized
05-08-2008, 05:57 PM#4
Anitarf
constant globals: ALL_CAPS
other globals, locals, structs, methods: likeThis
function, library and interface names: LikeThis
05-08-2008, 07:50 PM#5
Ammorth
CONSTANT_GLOBALS
NonConstantGlobals
localVariables
methodFunctions
NormalFunctions
inlinedFunctions *

*Basically a function that could be in-lined (usually 1 liners) that I don't in-line unless I'm looking for more speed.
05-08-2008, 08:03 PM#6
Strilanc
CONSTANT_NAMES
StructNames
methodNames
variableNames
functionNames
FunctionsIntendedForOthers (just to follow the 'standard' set by blizzard)
05-08-2008, 09:22 PM#7
PurgeandFire111
I use the same stuff as Alexander.
05-08-2008, 11:33 PM#8
Vexorian
There really isn't a naming convention.

What I do:

CONSTANT_VAR
Public_Global_variable

Privateglobal

privateFunction

PublicFunction

aStructMethod

and locals should rarely take more than 2 characters.
05-09-2008, 01:38 AM#9
TheSecretArts
I use whatever suits me!
Though I use caps for important static variables.
05-09-2008, 02:37 PM#10
ProFeT
All my struct's names start with s_
05-09-2008, 04:02 PM#11
ADOLF
i think sense to make the uniform agreement is not present - everyone writes how to him conveniently...

// as for me:
globals - XXX_a_b_c where XXX - module name (SPL - spells, TST - tests etc), a - type (i int, r real), b - struct name, and additional c - variable name^^

SPL_r_p_vx - vectorx of projectile, it is real and use in spellCast module

and it is convenient for me, though to whom that to another probably is not present...