• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "C" language continue statement in applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: Styled text and non-Gregorian dates (From: Christopher Nebel <email@hidden>)
 >Re: Styled text and non-Gregorian dates (From: Philip Aker <email@hidden>)
 >Re: Styled text and non-Gregorian dates (From: "Mark J. Reed" <email@hidden>)
 >"C" language continue statement in applescript (From: Satyam Satyanarayana <email@hidden>)

  • Prev by Date: "C" language continue statement in applescript
  • Next by Date: CURL+FTP scripting
  • Previous by thread: "C" language continue statement in applescript
  • Next by thread: MacSX 10.5.6, Opening the sidebar in Preview
  • Index(es):
    • Date
    • Thread