# HG changeset patch # User Wuzzy # Date 1492613060 -3600 # Node ID 1455b4ad1ec31627b680870eb9205eba4ebc3225 # Parent 5c2e7552c4268c14491e6854d5882b6023469385 PascalSyntax: Fix syntax diff -r 5c2e7552c426 -r 1455b4ad1ec3 PascalSyntax.wiki --- a/PascalSyntax.wiki Wed Apr 19 15:42:12 2017 +0100 +++ b/PascalSyntax.wiki Wed Apr 19 15:44:20 2017 +0100 @@ -1,11 +1,10 @@ -#summary Pascal syntax rules +#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. +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. -== Two Pascal rules for pas2C == +== Pascal rules for `pas2c` == # Never use `not` without brackets # Never use `in` with numerals @@ -14,20 +13,20 @@ Forbidden: -`if a in [1, 2] then` + `if a in [1, 2] then` Allowed: -`if a in [sprBubble, sprAmGirder] then` + `if a in [sprBubble, sprAmGirder] then` Forbidden: -`if not isExploded then` + `if not isExploded then` Allowed: -`if not (isExploded) then` + `if not (isExploded) then` Allowed -`if isExploded <> true then` + `if isExploded <> true then`