I love questions like this one.


on saveArray

  global gBigArray

  -- target a specific custom property set
  set the customPropertySet of stack "allMyArrays" to "uBigArray"

  -- replace all elements of 'uBigArray' CPS with 'gBigArray'
  set the customProperties of stack "allMyArrays" to gBigArray

  -- save it
  save stack "allMyArrays"

end saveArray



Then three days later, to get those values back into an array variable:



on loadArray

  global gOtherBigArray

  -- target a specific custom property set
  set the customPropertySet of stack "allMyArrays" to "uBigArray"

  -- replace all elements of 'gOtherBigArray' with the 'uBigArray' CPS
  put the customProperties of stack "allMyArrays" into gOtherBigArray

end loadArray



HTH -
Phil Davis



Ben Fisher wrote:
I'm using fairly large arrays. These need to be stored as a file on the hard drive or in some other manner. The trick is that they have to be quickly retrieved.

The way I'm handling this now is to write all the elements of the array into 
return-delimited data, compressing this data, and then writing it to the file. 
This is slow to retrieve. I know that it's slow to find the nth line of 
something, but I can't think of another way to delimit the data.

Can anyone think of a way to store an array? Can it be saved into the stack 
somehow?

-Ben

_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to