[fpc-pascal] Procedural parameters
Hairy Pixels
genericptr at gmail.com
Sun Dec 15 01:58:36 CET 2024
On Dec 15, 2024 at 1:22:25 AM, Adriaan van Os via fpc-pascal <
fpc-pascal at lists.freepascal.org> wrote:
> Similarly, you also cannot write:
> function A(B : (one,two,three)) : double;
>
> Not really. The function type declaration is a Borland invention, not
> original Pascal.
>
> Regards,
>
> Adriaan van Os
You mean the original pascal only allowed function declarations to be
parameter types?
Forcing function types and pointers to be type declaration only is now a
limitation for generic procedures and should be reversed. No reason to be
following what some Borland engineer was doing in the 80’s when it’s 2024.
procedure DoThis<T>(param: ^T);
procedure DoThis<T>(param: function(a, b: T): Boolean);
Regards,
Ryan Joseph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20241214/606dc73d/attachment.htm>
More information about the fpc-pascal
mailing list