[fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

Ben Grasset operator97 at gmail.com
Tue Jun 11 18:27:56 CEST 2019


On Mon, Jun 10, 2019 at 6:21 AM Martin Frb <lazarus at mfriebe.de> wrote:

> If you did have "procedure P1(x: ^Byte); overload;", how would you call it?
>

I would think it should be compatible *not* with this:

type PB = type ^byte;

but with anything declared like this:

type PB = ^byte;

On Mon, Jun 10, 2019 at 6:21 AM Martin Frb <lazarus at mfriebe.de> wrote:
> This is not allowed in type:
>   type PPFoo = ^^Foo;
> But what if you need it for a param?
>

Well, double-caret would still just be generally invalid syntax,
presumably. You wouldn't just introduce it for no reason here.

As far as the rest, certainly, some of that could work in theory, but I
don't think it necessarily would *need* to be all added at the same time,
if added at all. There's no reason not to consider / evaluate each bit
separately, I wouldn't say.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190611/68d969a2/attachment.html>


More information about the fpc-devel mailing list