How transform a spreadsheet in an array ?
Geoff Canyon
gcanyon at inspiredlogic.com
Sun Jan 6 01:29:00 EST 2002
>diskot123 at juno.com wrote:
>>put tarray["Name"] --return 1,0,10
>>put tarray["Data1"] --return 10,1,0
>>
>>put keys(tarray) returns Name,Data1,Data2,Data3
>
>I've found this, but i want something like this :
>put tarray["Name3","Data3"] -- return 10
>
Revolution doesn't support multi-dimension arrays. You can accomplish many of the same things by simply using what would be the keys of a multi-dimension array, because Revolution arrays are associative, meaning that the keys don't have to be 1,2,3,4, etc. They can be "apple", "peach", "pear", etc. which means they can be "1,1", "1,2", "1,3" and "2,1", "2,2", "2,3" etc.
But in your case, there isn't a built-in way to transform your data into such an array. You could easily script it, though.
regards,
Geoff
More information about the use-livecode
mailing list