author Wuzzy
Tue, 25 Apr 2017 22:14:15 +0100
changeset 993 dc572809f874
parent 981 a18f350d00ff
child 2016 3e426e5979ec
permissions -rw-r--r--
LuaAPI: Add dud mine for ShowMission

#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 `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

=== 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`