There are several rules about the coding convention:
- You MUST write
Name : TypeasName: Type. - You MUST write continue, break, halt, and exit as Continue, Break, Halt, Exit.
- You MUST do Exit(n) instead of assigning value to the function and Exit()ing.
- You MUST assign default return value to the function in the first line. (See Init in P2.Config.pp)
- You MUST put newline between statement and block.
- You MUST put brackets after the function name, even if it does not take any arguments. This does not apply to compiler intrinsics excluding Exit.
- You MUST concatenate string and character with + instead of
'string'#123. - Units in
usedMUST be separated by newlines by each groups: (Object) Pascal native, Each groups of Free Pascal native units, and P2's own units. - You MUST access properties by
Self.PropertynotProperty.