Re: "C" language continue statement in applescript
Re: "C" language continue statement in applescript
- Subject: Re: "C" language continue statement in applescript
- From: Axel Luttgens <email@hidden>
- Date: Thu, 7 May 2009 11:35:39 +0200
Le 7 mai 09 à 11:09, Satyam Satyanarayana a écrit :
Hi,
I am using "repeat" statement with many "if" statements. The
situation is in such a way that I can't use "if-else" and so I have
placed many "if" statments.
Among those "if" statements, atleast one "if" is executed, it should
continue repeat for next item.
This is something similar to "continue" statement in "for loop" of C
language.
I googled a lot and couldn't find something relevant to it.
Or is there some "jump" statement like in Apple script so that I can
jump to last line of repeat and so it continues as usual.
Waiting eagerly for some response from great techies.
Hello Satyam,
Do you mean something like this?
-- The "true" loop
repeat with i from 1 to 10
-- A dummy loop allowing to use "exit"
-- as a susbtitute for a "continue" statement
repeat while true
if i < 5 then
-- do something
exit repeat
end if
if i = 6 then
-- do something else
exit repeat
end if
-- do another thing
exit repeat
end repeat
end repeat
HTH,
Axel _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden