next up previous contents index
Next: The Case statement Up: Statements controlling program flow. Previous: Statements controlling program flow.

Assignments

In addition to the standard Pascal assignment operator (:=), Free Pascal supports some c-style constructions. All available constructs are listed in table (gif).

  

Assignment Result
a += b Adds b to a, and stores the result in a.
a -= b Substracts b from a, and stores the result in a.
a *= b Multiplies a with b, and stores the result in a.
a /= b Divides a through b, and stores the result in a.
Table: Allowed C constructs in Free Pascal

For these connstructs to work, you should specify the -Sc command-line switch.

Remark: These constructions are just for typing convenience, they don't generate different code.



root
Fri Sep 11 18:27:51 CEST 1998