Another use of UNIV is type-compatibility of procedural parameters. For example
with
function BinaryFind
( theValuePtr : univ UnivPtr;
theFirstIndex : Int32;
theLastIndex : Int32;
function SmallerThan
( theIndex : Int32;
theValuePtr : univ UnivPtr): boolean;
function EqualTo
( theIndex : Int32;
theValuePtr : univ UnivPtr): boolean;
var theFoundIndex : Int32): boolean;
But this kind of procedural parameter doesn't seem to be included in the rule for
<parameter-declaration>. it is allowed in macpas and iso modes.
ISO-7185 Pascal has
formal-parameter-list = "(" formal-parameter-section { ";"
formal-parameter-section } ")" .
formal-parameter-section = value-parameter-specification | variable-parameter-specification |
procedural-parameter-specification | functional-parameter-specification |
conformant-array-parameter-specification .
functional-parameter-specification = function-heading .
procedural-parameter-specification = procedure-heading .
Regards,
Adriaan van Os
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal