next up previous contents index
Next: Using assembler in your Up: Using functions and procedures Previous: Const parameters

Open array parameters

Free Pascal supports the passing of open arrays, i.e. You can declare a procedure with an array of unspecified length as a parameter, as in Delphi.

The prototype declaration for open array parameters is:

Function Func ( ... [Var|Const] Ident : Array of Type ...) : ReturnType;

ProcedureFunction Func (... [Var|Const] Ident : Array of Type ...);
The [Var|Const] means that open parameters can be passed by reference or as a constant parameter.

In a function or procedure, you can pass open arrays only to functions which are also declared with open arrays as parameters, not to functions or procedures which accept arrays of fixed length.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998