Question about repeat loop
Question about repeat loop
- Subject: Question about repeat loop
- From: Phil Calvert <email@hidden>
- Date: Sat, 14 Jul 2001 09:47:31 -0700
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?
--
set list1 to {"I", "want", "this", "to", "work"}
set list2 to {"please", "work"}
repeat with TheItem1 in list1
repeat with TheItem2 in list2
if ((TheItem1) is (TheItem2)) then--this is never true
display dialog "I'm in the if 1"
exit repeat
end if
end repeat
end repeat
repeat with TheItem1 in list1
repeat with TheItem2 in list2
if ((TheItem1 as text) is (TheItem2 as text)) then--this works
display dialog "I'm in the if 2"
exit repeat
end if
end repeat
end repeat
--
TIA,
Phil