happy little discovery - "repeat for each key"
Jim Ault
JimAultWins at yahoo.com
Wed Oct 15 17:31:01 EDT 2008
I think that this is true for 2.7.2 and later, but not for earlier versions.
Jim Ault
Las Vegas
On 10/15/08 11:59 AM, "Phil Davis" <revdev at pdslabs.net> wrote:
> I don't know why I haven't seen this before, but yesterday I discovered
> to my great pleasure that we can use array keys in the "repeat for each"
> structure, like this:
>
> repeat for each key tKey in tMyArray
> put tMyArray[tKey] into fld tKey of this cd
> end repeat
>
> It's especially useful in cases like the above where your array keynames
> are the same as your field names.
More information about the use-livecode
mailing list