Am 07.06.2019 um 21:06 schrieb Ben Grasset:
On Fri, Jun 7, 2019 at 2:35 PM Jonas Maebe <[email protected] <mailto:[email protected]>> wrote:

    None of these can be defined as a type in parameter lists. Keep in
    mind
    that "^Type" defines a new type. Semantically, it's at the same
    level as
    "0..5" and "record a, b: longint end;".


Right, that's the point. There's nothing else that *would* make any syntactic sense in a parameter list besides "^Type" that isn't already allowed in them.
No, I think you *missed* the point. "^Type" defines a new type. "0..5" defines a new type. "set of (Alpha, Beta, Gamma)" defines a new type. "record a, b: longint end" defines a new types. All four of these can be used either to declare a named type or for an anonymous type in a variable declaration. However none of these can be used in a parameter declaration. Parameter declarations and variable declarations are different beasts, they have different rules (for example you can't declare open arrays outside of parameter declarations and no, dynamic arrays don't count, cause despite them sharing a syntax dynamic arrays and open arrays are different concepts).

Regards,
Sven
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to