How to use an array to solve the following...
gcanyon+rev
gcanyon+rev at gmail.com
Sun Feb 19 23:54:33 EST 2012
On Feb 19, 2012, at 8:47 PM, Kay C Lan <lan.kc.macmail at gmail.com> wrote:
> I'm sure others will now improve on that.
I doubt it. You're using repeat for each in a sensible way, and there's rarely something faster than that.
If you really wanted to tighten up the repeat, you could do something like this, but I doubt that it would be much faster:
put item 1 of tStore into tLastItem
repeat for each line tLine in tStore
put item 1 of tLine into tCheck
put tCheck - tLastItem into x
switch
case (x > 20)
put tLastItem + 10 & tab & 0 & cr after tStore2
case (x > 10)
put tCheck - 10 & tab & 0 & cr after tStore2
end switch
put tLine & cr after tStore2
put tCheck into tLastItem
end repeat
More information about the use-livecode
mailing list