common code patterns
Ralph DiMola
rdimola at evergreeninfo.net
Thu Aug 10 13:38:31 EDT 2017
To make this even more flexible:
repeat for each line tLine in tLines with [counter] tIndex [start] [{1}|x]
[step] [{1}|y]
end repeat
Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net
-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of Devin Asay via use-livecode
Sent: Thursday, August 10, 2017 12:33 PM
To: How to use LiveCode
Cc: Devin Asay
Subject: Re: common code patterns
On Aug 10, 2017, at 10:25 AM, Ralph DiMola via use-livecode
<use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:
Monte,
I find that I do this quite often
local tIndex
put 1 into tIndex
repeat for each line tLine in tLines
add 1 to tIndex
end repeat
What would be very help full is the construct:
repeat for each line tLine in tLines index tIndex end repeat
This eliminates 3 lines.
+1. I like this idea because I end of doing something similar a lot. Maybe
this sounds a little more x-codish:
repeat for each line tLine in tLines with [counter] tIndex end repeat
Devin
Devin Asay
Director
Office of Digital Humanities
Brigham Young University
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list