Back to homepage
PascalSyntax
History
Hedgewars-specific Pascal syntax rules
Updated Fri, 11 Oct 2019 21:09:28 +0100 by Wuzzy

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

  1. Never use not without brackets
  2. Never use in with numerals
  3. Do not use Unicode characters anywhere (even in comments)

Examples

Forbidden:

if a in [1, 2] then

Allowed:

if a in [sprBubble, sprAmGirder] then

Forbidden:

if not isExploded then

Allowed:

if (not isExploded) then

Allowed

if isExploded <> true then