Also, there seems to be a speed advantage with using the multi- dimesional arrays:

on mouseUp
   put the millisecs into ts
   repeat with i = 1 to 1000
      repeat with j = 1 to 1000
         put "counting" into tArray[i,j]
      end repeat
   end repeat
   put the millisecs - ts into inTime

   put the millisecs into ts
   repeat with i= 1 to 1000
      repeat with j = 1 to 1000
         get tArray[i,j]
      end repeat
   end repeat
   put the millisecs - ts into outTime

   put the millisecs into ts
   repeat with i = 1 to 1000
      repeat with j = 1 to 1000
         delete variable tArray[i,j]
      end repeat
   end repeat
   put the millisecs - ts into deleteTime

   put inTime && outTime && deleteTime
end mouseUp

this produced "3537 2331 3342"

replacing tArray[i,j] with tArray[i][j] produced "2846 1741 2761" which is a 25-30% gain, which could be useful when dealing with large arrays.

Best,

Mark
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to