On 12/18/20 9:42 AM, William Michels via perl6-users wrote:
Hi Laurent, I get:
Fruitstand in Fruit<140431957910656>.location has
Fruit<140431957910656>.apples apples.
[Rakudo v2020.10]
Best, Bill.
Hi Bill,
From my notes in progress:
-T
*** addressing values inside and object ***
Reading:
say $FruitStand.apples
400
$FruitStand.apples.say
400
print $FruitStand.location ~ " has " ~ $FruitStand.apples ~"
apples in stock\n";
Cucamonga has 400 apples in stock
Note: an "oops!". Separate the variables from the string, or else:
say "$FruitStand.location has $FruitStand.apples apples in
stock";
Fruit<79300336>.location has Fruit<79300336>.apples apples in
stock
Writing (must be declared as "rw"):