WHICH doesn't give you a numerical value. just print it as it is.

On 11/02/2019 12:16, ToddAndMargo via perl6-users wrote:
> On 2/11/19 2:52 AM, Timo Paulssen wrote:
>> Please be aware that WHERE will give you the actual memory address of an
>> object, but moarvm has a moving garbage collector, which means that
>> objects can change their memory location. at the moment it will only
>> happen up to two times, i believe.
>>
>> you'll probably have a better result with .WHICH for what you want to
>> achieve.
>>
>> On 11/02/2019 07:12, ToddAndMargo via perl6-users wrote:
>>> WHERE is pretty sweet command!
>>>
>>>
>>> $ p6 'sub a (Buf $b) { say $b.WHERE.base(0x10) }; my $c =
>>> Buf.new(1,2,3); say $c.WHERE.base(0x10); a($c);'
>>>
>>> 7F385D41334C
>>> 7F385D41334C
>
> $ p6 'sub a (Buf $b) { say $b.WHICH.base(0x10) }; my $c =
> Buf.new(1,2,3); say $c.WHICH.base(0x10); a($c);'
> No such method 'base' for invocant of type 'ObjAt'. Did you mean any
> of these?
>     Hash
>     hash
>     take
>
>   in block <unit> at -e line 1
>
>
>

Reply via email to