You are here

Variable Naming Conventions

Subscribe to Syndicate
All variables should be named using camel case rather than hyphens or underscores. E.g myVariable or MyVariable instead of MY_VARIABLE.

However, if is a parameter, local, or instance var that is meant to track a cope of a database SEQ key, then call it what it is. eg pM_SEQ means that the parameter we expect is an M_SEQ key. This helps with variable assignment.

All database names will be named using underscores and in UPPER_CASE to make an obvious differentiation between the database and other task/class/instance/local variables.

Scope / Type

Prefix

Convention

Task

t

 

Class

c

 

Instance

i

 

Local

none

Developer preference, prefer myVariable rather than MyVariable.

Parameter

p

 

Constant

k
  • Developer preference
  • prefer prefixing with k.  E.g. kNameOfFile
  • Scope left to developer preference