libfawk's pascal: fpas
Libfawk pascal, fpas (for function-pascal), is a modern, case
sensitive dialect of the pascal language.
Inherited from libfawk, it supports array-in-array, struct-like
array addressing syntax, function references saved in variables and
the builtin functions and variables of fawk.
Major differences from the common dialects
- Fpas is case sensitive. This affects
all variable names, function names - and keywords (which are
always written with lowercase).
- There is no type keyword: types are automatic, like in fawk
- There is no var keyword: variables are created automatically, like in fawk
- There is no procedure, only function. Setting the return value of
a function is not mandatory; when not set, NIL is returned.
- There is no main program "begin/end." but function main() instead.
- There is no "uses" keyword, but "include" instead.
- There is no "record" keyword. Use the array-in-array feature with
with the "." syntax.
- Comments are always {} because (* *) blocks and // are not supported.
- There is no "and then", "or else": plain "and" and "or" always
acts like these, evaluating only what is required.
- Two strings can not be concatenated using the + operator; instead the
+ operator will convert the strings to numbers and sum them. Use the
@ operator for string concatenation (this is a libfawk-specific feature
that is present in all libfawk scripting languages).
- There are no bitwise operators.
- All strings are C-style strings with no length limit.
- There are no sets and enums.
- No break or continue statement in loops (yet?).
- there is support for variable argument (vararg) functions
- text-block support: multiline template-like string "literal" type with expression inserts
Rationale
Case sensitivity
The libfawk vm is case sensitive for variable and function names.