Multiple Array Element Selection
Dave Calkins
davecalk at surfbest.net
Thu Jul 25 17:48:01 EDT 2002
Hi All,
I have searched through the rev. dictionary / and pdf docs and have not found the
proper syntax to select multiple elements of an array.
To burrow from Dave's example,
function reverseLines2 tList
split tList by cr
put the number of lines of keys(tList) into tNumKeys
repeat with i = tNumKeys down to 1
put tList[i] & cr after tResult
end repeat
delete last char of tResult
return tResult
end reverseLines2
Seems to me the syntax should be something like this.
put tList[i to (i + 5)] & cr after tResult
other then doing ...
put tList[i] & cr after tResult
put tList[(i+1)] & cr after tResult
put tList[(i+2)] & cr after tResult
etc.
Any suggestions?
Dave Calkins
More information about the use-livecode
mailing list