Re: Basic Q: When is a string not a string?
Re: Basic Q: When is a string not a string?
- Subject: Re: Basic Q: When is a string not a string?
- From: Emmanuel <email@hidden>
- Date: Sun, 25 Jan 2004 00:41:45 +0100
At 2:23 PM -0600 24/01/04, Chap Harrison wrote:
>
I just don't understand this language. Sure I have a workaround, but I'd like to know what concept I'm unclear on here. Please help a despairing lad ;-)
The point is that "repeat with an_item in a_list" is a very original and very smart feature of AppleScript. Usually languages use counter in loops, and usually you may change the value of the counter inside the loop. Inside a "loop in a list" in AppleScript, you can also change the value of the list item.
So, you may do:
----------------
repeat with theItem in theList
set contents of theItem to 1
end
----------------
this will fill the list with ones.
This to present it as naturally as possible that theItem carries a reference to the given item in the list, not the value of that item.
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.