author Wuzzy
Sun, 13 Dec 2020 21:27:30 +0100
changeset 2217 50275983a97a
parent 2019 12cc62c0ae38
permissions -rw-r--r--
VisualGearTypes: linetrail is thin

#summary Hedgewars-specific Pascal syntax rules
= Hedgewars-specific Pascal syntax rules =

When programming in Pascal for Hedgewars, we have two rules which must be always obeyed. This is because of our tool [pas2CTutorial Pas2C] which doesn't fully understand Pascal yet. If these rules are broken, Pas2C will fail to operate.

== Pascal rules for `pas2c` ==

 # Never use `not` without brackets
 # Never use `in` with numerals
 # Do not use Unicode characters anywhere (even in comments)

=== Examples ===


 `if a in [1, 2] then`


 `if a in [sprBubble, sprAmGirder] then`


 `if not isExploded then`


 `if (not isExploded) then`


 `if isExploded <> true then`