[fpc-pascal] More syntax questions (part 3)

Adriaan van Os adriaan at adriaan.biz
Sun Dec 17 10:38:28 CET 2023


> 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



More information about the fpc-pascal mailing list