Re: Question: Arrays and Matrixes
Re: Question: Arrays and Matrixes
- Subject: Re: Question: Arrays and Matrixes
- From: Christopher Nebel <email@hidden>
- Date: Tue, 12 Mar 2002 13:36:49 -0800
On Monday, March 11, 2002, at 10:58 PM, email@hidden wrote:
I'm starting to try to play around with construction and filling of
multi-dimensional arrays/matrixes, but I can't find or figure out the
correct
verbage to create one. Specifically, I'd like to create a 4 dimensional
array
(100x250x320x160) filled with datatype character.
Multi-dimensional arrays are easy in AppleScript -- they're just lists
of lists (of lists of lists of...). To get an item out, you just say
"item w of item x of item y of item z of array".
However, I'm sorry to say that a 100x250x320x160 array is impossible in
AppleScript, because it will exceed the address range of the PowerPC
processor. Because of how AppleScript stores things, you're looking at
somewhere on the order of 20 GB worth of data. Even if you used C, it'd
still be over 1 GB -- possible in Mac OS X, but still not pretty. If
you know you're only going to be filling in a few of the locations, you
could use some sort of sparse array technique to bring the memory load
down, but that's harder.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.