When the $COPERATORS directive or the -Si options are enabled, some assignments in the style of a C language available (disabled by default). They allow shorthand notation for some constructs:
var N: Double; begin N+=1; // same as N:=N+1 N-=2; // same as N:=N-2 N*=3; // same as N:=N*3 N/=4; // same as N:=N/4 end.
This form is no different from the regular one and generates the same code (and has the same requirements, for example, regarding the operand types).
Note that division is the Pascal / operator, not div, so it’s only available for float numbers. For integers, the full form (N := N div 5) must be explicitly used.
The expression to the right of the operator is evaluated first, then the operator itself. For example, the result of the following expression will be 6, not 4:
N:=3; N*=1+1; // same as N:=N*(1+1)