Ben

Is that really  a "nasty little bug"? It was not the split that 
corrupted the container but your putting an array element into the same 
container as if it were not an array. Yes, this is a bug, but 
intuitively  I would not have done that at any time because it seems to 
me poor practice to change the variable construct merely by a put 
action, even in a language not strongly typed. I excuse shifts between 
numbers and strings here, given the nature of the language.

There is no bite from the bug if you write something like this, if you 
really _must_ keep using finfo as your sole variable:
on mouseUp
   put "happy easter,every one" into finfo
   split finfo by comma and space
   get finfo["happy"]
   combine finfo using return and space -- or whatever
   put it into finfo
   put finfo
end mouseUp

I agree the bug is there. It just seems pretty inconsequential rather 
than nasty.

regards
David


On Friday, March 29, 2002, at 12:07 , Ben Rubinstein wrote:

> Rev 1.1.1b2, MacOS9.
>
> This script:
>
>     on mouseUp
>       put "happy easter,every one" into finfo
>       split finfo by comma and space
>       put finfo["happy"]
>     end mouseUp
>
> outputs "easter", as you would expect.
>
> This script:
>
>     on mouseUp
>       put "happy easter,every one" into finfo
>       split finfo by comma and space
>       put finfo["happy"] into finfo
>       put finfo
>     end mouseUp
>
>
> outputs "XXXXer", where XXXX is four bytes of binary data - exactly what
> changes every time the script is compiled.  This is consistent whatever 
> the
> data, ie it's always the first four bytes of the result that are
> overwritten.
>
>   Ben Rubinstein               |  Email: [EMAIL PROTECTED]
>   Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
>   http://www.cogapp.com        |  Fax  : +44 (0)1273-728866
>
>
> _______________________________________________
> improve-revolution mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/improve-revolution
>

_______________________________________________
improve-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/improve-revolution

Reply via email to