operator shl (operand1, operand2: integer_type) = Result: integer_type;or
procedure shl (var operand1: integer_type; operand2: integer_type);
In GNU Pascal, shl
has two built-in meanings:
operand1
is shifted left by
operand2
; the result is stored in operand1
.
shl
is a Borland Pascal extension.
Use of shl
as a “procedure” is a GNU Pascal extension.
program ShlDemo; var a: Integer; begin a := 1 shl 7; { yields 128 = 2 pow 7 } shl (a, 4) { same as `a := a shl 4' } end.