Problem with BinaryEncode and variable params

Mark Schonewille m.schonewille at
Mon Dec 25 19:44:19 EST 2006

Hi Matt,

Thanks for trying. Actually, I tried that myself too and noticed that  
it works and as amatter of fact I tried what I think was Bryan's  
original script

on mouseUp
   put "0,206,0" into tColors
   put item 1 of tColors+0 into c1
   put item 2 of tColors+0 into c2
   put item 3 of tColors+0 into c3
   put binaryEncode("CCCC",0,c1,c2,c3) --into varNewImageData
end mouseUp

and it works fine for me while Bryan observed a problem. So, the  
question remains, why doesn't it work for him?




Consultancy and Software Engineering

Salery is the easiest way to set up your own web store: http://

Op 25-dec-2006, om 22:05 heeft Matt het volgende geschreven:

> As an answer to your question if I did
> put "0,1,0" into temp
> put item 1 of temp + 1
> It will put "1" in the message box because the "item 1 of temp" is  
> executed
> first, giving "0", and then +1 is executed, adding 1 to the result  
> of the
> first, which is then send to the message box. Therefore, (item 1 of  
> temp) +
> 1 is the same as item 1 of temp + 1.
> -- 
> Matthew Peterson
> Programmer

More information about the Use-livecode mailing list