> On Apr 21, 2022, at 3:48 AM, Mattias Gaertner via fpc-pascal
> wrote:
>
>> Writeln(Apply(@StrFunc, 'Foobar')); // will write FOOBAR
>> Writeln(Apply(@NegFunc, 42)); // will write -42
>> end.
>
> Mind boggling. :)
This was actually your idea if I remember correctly. :) I think you said even
On Thu, 21 Apr 2022, Hairy Pixels via fpc-pascal wrote:
On Apr 21, 2022, at 3:48 AM, Mattias Gaertner via fpc-pascal
wrote:
Writeln(Apply(@StrFunc, 'Foobar')); // will write FOOBAR
Writeln(Apply(@NegFunc, 42)); // will write -42
end.
Mind boggling. :)
This was actually your idea if
On Thu, 21 Apr 2022 10:00:46 +0200 (CEST)
Michael Van Canneyt via fpc-pascal
wrote:
> On Thu, 21 Apr 2022, Hairy Pixels via fpc-pascal wrote:
>
> >
> >
> >> On Apr 21, 2022, at 3:48 AM, Mattias Gaertner via fpc-pascal
> >> wrote:
> >>> Writeln(Apply(@StrFunc, 'Foobar')); // will write FOOBAR
If you want to pass a pointer to ^T in a generic function is there anyway safe
to do this currently? Pascal doesn’t allow ^ types in function arguments (why?)
and generics don’t seems to support pointers either (why?).
generic TValues = array[0..0] of T;
generic PValues = ^specialize TValues
> On Apr 20, 2022, at 1:15 PM, Sven Barth via fpc-pascal
> wrote:
>
> Writeln(Apply(@StrFunc, 'Foobar')); // will write FOOBAR
> Writeln(Apply(@NegFunc, 42)); // will write -42
For Sven, this reminds me, since we got this merged in now does that mean
closures are ready? :D
Regards,
On Fri, 22 Apr 2022, Hairy Pixels via fpc-pascal wrote:
If you want to pass a pointer to ^T in a generic function is there anyway safe to do this currently?
Pascal doesn’t allow ^ types in function arguments (why?)
Because it is a type definition and you can't put type definition in a
functi