How transform a spreadsheet in an array ?

Rob Cozens rcozens at pon.net
Mon Jan 7 14:44:01 EST 2002


Moi:>I think I've covered all the possibilities this time.      :{`)

Nope...I forgot to mention the whole scheme presupposes there are no return
characters in Data1-Data3.

If THAT is not the case, use unique itemDelimiters:

Data1*1*0*10^Data2*10*1*0^Data3*0*1*10&

Disclaimer: I have not started scripting in Transcript; so this is how I'd
do it in HyperTalk:

function getElement xCoord,yCoord,zCoord,xDelim,yDelim,zDelim,zaArray --
for drei dimensions, eh Mark?
  put the itemDelimiter into savedDelimiter
  set the itemDelimiter to zDelim
  get item zCoord of zaArray
  set the itemDelimiter to yDelim
  get item yCoord of it
  set the itemDelimiter to xDelim
  get item xCoord of it
  set the itemDelimiter to savedDelimiter
  return it
end getElement

Assuming zaArray contains a string formatted along the lines of the one
above my disclaimer,

	get getElement(2,2,1,"*","^","&",zaArray)

returns 10

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1155 bytes
Desc: not available
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20020107/07aff77b/attachment.bin>


More information about the use-livecode mailing list