Mystery with arrays (lost key)

andu undo at cloud9.net
Tue Apr 9 20:17:01 EDT 2002


Tariel Gogoberidze wrote:
> 
> Mac OS 9.1  MetaCard  2.3  and up to the latest  build of 4.2B2
> 
> on mouseUp
>   IF 1=2 THEN
>     put  1 into test2
>   else
>     put 55 into  GrandTotals[test1]
>     put 66 into GrandTotals[test2]
>     put 22 into  GrandTotals[test3]
>   end if
> 
>   put keys (GrandTotals)
> 
>   -- returnes
>   --
> 
>   test1
>   test3
>   -
> end mouseUp
> 
>        TEST2   IS  LOST  IN   THE   RETURNED   KEYS !!!
> 
> Now  if I will deactivate "put 1  into test2" then everything works just
>  fineÉ
> 
> on mouseUp
>   IF 1=2 THEN
>   --  put  1 into test2
>   else
>     put 55 into  GrandTotals[test1]
>     put 66 into GrandTotals[test2]
>     put 22 into  GrandTotals[test3]
>   end if
> 
> 
>   put keys (GrandTotals)
> 
>   -- returnes
> 
>   --
>   test1
>   test2
>   test3
>   --
> end mouseUp
> 
> Can  somebody explain this us  a valid behavior?. If not, and this
> behavior will be confirmed on other computers I guess it should be
> reported  as  a bugÉ

Same here and "put keys (GrandTotals)" returns empty if you put 1 into
all variables if 1=2.
Bug.

> 
> T.G.
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard

-- 
____________________
Regards, Andu Novac



More information about the metacard mailing list