Hybrid OperationsModern Pascal is named so, as it incorporates modern syntax from other programming languages. Most of these are what we call MACRO aliases, as the functionality already exists, however, there are a few operators that provide new functionality to the original Pascal language.
Alias Original Description << shl bitshift the number on the left by the number on the right >> shr bitshift the number on the left by the number on the right == = Comparison equal sign != <> Comparison of not equal % mod Perform modulus ! not Opposite of the current value
Alias Original Description += := Store to the value on the left, by adding the right. -= := - Store to the value on the left, by subtracting the right. *= := * Store to the value on the left, by multiplying the right. /= := / Store to the value on the left, by dividing the right.
Alias Original Description /* (* Start of a C-style comment block. */ *) End of a C-style comment block.
Optional GrammarThe following are accepted into the existing lexicon as Modern Pascal.
- When doing a for loop, the variable can be defined inline. for var loop:=start to end.
The following are in a special build of the product, seeing if these grammar changes will cause major problems for anyone.
- then - if your code is formatted with parenthesis for the comparison, the conjunctive adverb is optional.
- do - if your code is formatted with parenthesis on a while loop, then conjunctive adverb is optional.