Program Foo ( Input, Output );
In GNU Pascal, headline parameters are optional. If the
headline is omitted, a warning is given.
otherwise as an alternative to else
(according to Extended Pascal):
case x of
1: writeln ( 'one' );
2: writeln ( 'two' );
otherwise: writeln ( 'many' );
end (* case *);
If there are two ore more statements following otherwise,
they must be grouped with begin and end.
card ( myset ) function for sets
which counts their elements.
Function Max ( x, y: Integer ): Integer; Inline ( $58 / $59 / $3B / $C1 / $7F / $01 / $91 );GNU Pascal:
Inline Function Max ( x, y: Integer ): Integer;
begin (* Max *)
if x > y then
Max:= x
else
Max:= y;
end (* Max *);
(Actually, a more general Max is already built-in.)
This feature is not so important as it might seem because in
optimization level 3 (see above), GNU Pascal automatically
"inlines" short Procedures and Functions.
Go to the first, previous, next, last section, table of contents.