Mystery with arrays (lost key)

Tariel Gogoberidze PMDA at earthlink.net
Tue Apr 9 19:51:01 EDT 2002


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и
 
T.G.



More information about the metacard mailing list