Re: Procedural parameters

Hairy Pixels via fpc-pascal <[email protected]>
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <CAGsUGtm3DbvO_7JqZp03+CEDD8tnJUiJZ8N8nXjTD01L6Z0_wg@mail.gmail.com>
 On Dec 15, 2024 at 1:22:25 AM, Adriaan van Os via fpc-pascal <
[email protected]> 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

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.