Pascal Directive
The pascal
directive tells the compiler to use
Pascal calling conventions for the function or procedure. The caller
of the subroutine pushes arguments onto the stack, starting with the
leftmost argument. Before the subroutine returns, the subroutine pops
the arguments from the
stack.
Functions return ordinal values, pointers, and small records or sets
in EAX
and floating-point values on the FPU stack.
Strings, dynamic arrays, Variant
s, and large
records and sets are passed as a hidden var
parameter. If the subroutine is a method, Self
is
the first parameter, and the hidden var
parameter
is the second, so these parameters are pushed first onto the stack.