Go to the first, previous, next, last section, table of contents.

Bit, byte and memory manipulation

The (non-standard) bitwise operators `shl', `shr', `and', `or', `xor' work in GNU Pascal like in Borland Pascal. As an extension, you can use them as "procedures", for examples

  and ( x, $0000FFFF );

as an alternative to

  x:= x and $0000FFFF;

Instead of the Borland-specific notation `$ABCD' for hexadecimal numbers you also can use Extended Pascal notation:

   2#11111111   for a binary,
   8#177        for an octal,
  16#FF         for a hexadecimal number,

and so on up to a basis of 36.

Inc and dec are implemented like in Borland Pascal; pred and succ are generalized according to Extended Pascal:

  a:= succ ( a, 5 );

Absolute variables work only in the context of overloading with other variables, not in the context of specifying an absolute address. The Mem and Port arrays don't exist in GNU Pascal.

Borland Pascal's procedures FillChar and move are not built-in into GNU Pascal. However, you can write them by yourself using untyped Var parameters (see Sec. Data types).


Go to the first, previous, next, last section, table of contents.