Most commonly used naming conventions.

BlitzMax Forums/BlitzMax Programming/Most commonly used naming conventions.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

' types are camel case with a prefixed T, also note the order of declarations.
Type TIntStack
	' constants are upper case with underscores
	Const MAX_SIZE:Int = 10
	
	' globals & fields are camel case
	Field Items:Int[]
	Field Pos:Int

	' functions & methods are camel case, parameters are lowercase
	Method PushValue( value:Int)
		' locals are lowercase
		Local tmp:Int
	EndMethod
EndType


' toplevel globals are camel case
Global TestValue:Int = 1

' top leve locals are lower case
Local stack:TIntStack = TIntStack.Create()

' space to seperates logical parameters
LoadAnimImage( "file", 32,32, 0,10)

I allso use tabs at each new level, and spaces between operands in expressions.

EDIT: This is for basic/pascal like languages, but for C like languages i use mostly upper case for structs and defines, and lower case with underscores for everything else.