Front page | perl.perl6.users |
Postings from December 2022
Re: pointer confusion
Thread Previous
|
Thread Next
From:
Ralph Mellor
Date:
December 5, 2022 17:26
Subject:
Re: pointer confusion
Message ID:
CAPLR5ScgpMV6kUbRYuHEjDFyYeoOCFyL6_nL6FcwupHvf3oztw@mail.gmail.com
On Sat, Dec 3, 2022 at 11:44 AM ToddAndMargo via perl6-users
<perl6-users@perl.org> wrote:
>
> I am confused
I think the following is a golf of your confusion:
```
use NativeCall;
my Pointer $foo .= new: 42;
say $foo; # NativeCall::Types::Pointer<0x2a>
print $foo; # NativeCall::Types::Pointer<5895604297984>
```
I can see how someone might be confused by the two numbers:
* Decimal `42` which is the same as hex `0x2a`.
* Decimal `5895604297984` (or whatever) which isn't `42`/`0x2a`.
Why isn't the third number the same as the first two?
Am I right in thinking this distills what is confusing to you?
--
raiph
Thread Previous
|
Thread Next
-
pointer confusion
by ToddAndMargo via perl6-users
-
Re: pointer confusion
by Ralph Mellor