Re: initializing Pointer

2023-12-20 Thread ToddAndMargo via perl6-users
On 12/20/23 11:12, Marcel Timmerman wrote: Hi, I would like to initialize a Pointer with some value but get an error. For example; my $a = Pointer[Str].new('text'); The error thrown: Default constructor for 'NativeCall::Types::Pointer[Str]' only takes named arguments The way I can do it

Re: initializing Pointer

2023-12-20 Thread Elizabeth Mattijsen
Looking at the Pointer class code, it looks like you can either create it without arguments, or with an integer argument. The fact that you can parameterize the Pointer class, only indicates the type of data the pointer is pointing at. > On 20 Dec 2023, at 20:12, Marcel Timmerman wrote: > >

initializing Pointer

2023-12-20 Thread Marcel Timmerman
Hi, I would like to initialize a Pointer with some value but get an error. For example; my $a = Pointer[Str].new('text'); The error thrown: Default constructor for 'NativeCall::Types::Pointer[Str]' only takes named arguments The way I can do it now is by creating a CArray and then do a na