Re: Question about repeat loop
Re: Question about repeat loop
- Subject: Re: Question about repeat loop
- From: Emmanuel <email@hidden>
- Date: Sat, 14 Jul 2001 22:49:13 +0200
At 18:47 +0200 14/07/01, Phil Calvert wrote:
>
>
Hi list,
>
>
Can someone tell me why the "if ((TheItem1) is (TheItem2))" is never true in
>
this bit of code but "if ((TheItem1 as text) is (TheItem2 as text))" is
>
true?
In addition to Bill's reply, note that the fact that TheItem contains a
reference can be useful. You can use references to change the list. Example:
-------------------------
set theList to {"", "", ""}
repeat with theItem in theList
set contents of theItem to random number
end repeat
theList
-->{0.12450069253, 0.567051073863, 0.285439286314}
-------------------------
Emmanuel