« Return to Thread: Strange behaviour when using CAPS for a slot name

Re: Strange behaviour when using CAPS for a slot name

by Jeremy Tregunna-2 :: Rate this Message:

Reply to Author | View in Thread


On 17-Jun-09, at 8:29 AM, joh_90uk wrote:

> Steve, I see rather strange behaviour when using caps for a variable  
> name. See below:
>
> Io> 55 type
> ==> Number
> Io> aa:=55
> ==> 55
> Io> 55 type
> ==> Number
> Io> AA:=55
> ==> 55
> Io> 55 type
> ==> AA
>
> So by using a caps slot name during a slot assignment, the type of  
> the subject of that assignment is changed to the name of the slot.  
> Not sure why this is happening but I'm guessing it was not intended.

You will see why if you run the following two code snippets:

message(aa := 55) asString

and

message(AA := 55) asString

This was a special case created a couple of years ago to avoid manual  
setting of the type slot. But this is desired behaviour I suppose.

Regards,

Jeremy Tregunna
jeremy.tregunna@...



 « Return to Thread: Strange behaviour when using CAPS for a slot name