Cicode Programming Reference > Using Cicode Programming Standards > Variable Declaration Standards

Variable Declaration Standards

When declaring variables you should use consistent formatting. A variable declaration has up to five parts. Each part is separated by at least one tab stop:

Note: Parts contained within square brackets are optional. For example, you may omit the variable scope (it defaults to local). Parts contained within greater than ( < ) and less than ( > ) signs should be replaced with the relevant text/value. For example, you would replace <initial value> with an actual value. (You would not bracket your value with greater than and less than signs.)

When declaring your variables, the parts of each should align vertically (the scope part of each should be vertically aligned, the type part of each should be aligned, etc.). Each part of the declaration is allotted a set amount of space. If one part is missing, its space should be left blank. The missing part should not affect the positioning of the next part:

Module		 int	 miRecipeMax=100;
int iRecipeMax;
string sRecipeDefault ="Tasty";

See Also

Using Cicode Programming Standards