• 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: How to do a goto with Applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to do a goto with Applescript?


  • Subject: Re: How to do a goto with Applescript?
  • From: Robert Poland <email@hidden>
  • Date: Mon, 10 Jan 2011 11:01:16 -0700

Mark,

I guess I oversimplified the example.

if (x = 1) then
       set y to 1
-- and 4 more lines
else if (x = 2) then
       set y to 2
-- and 4 more different lines
end if

In my case currently there are around 30 else if statements and 585 lines of code.

After all the passing of information I was able to see where using goto's was not the best way to go.

If anyone would like to dig into this script i've attached an example.

Please be kind with your remarks.

Attachment: setBounds.zip
Description: Zip archive



> On Jan 10, 2011, at 9:52 AM, Mark J. Reed wrote:
>
>
>
> On Sun, Jan 2, 2011 at 1:39 PM, Robert Poland <email@hidden> wrote:
> Since when is the following not real code?
>
> if (x = 1) then
>        set y to 1
> else if (x = 2) then
>        set y to 2
> end if
>
> It's not real code because it can be replaced by one line, no goto required:
>
> set y to x
>
> I'm guessing that whatever Gordian knot you're really trying to untie is not trivial enough to be sliced by so dull a blade.
>
> --
> Mark J. Reed <email@hidden>
>

Robert Poland - Fort Collins, CO



 _______________________________________________
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

  • Follow-Ups:
    • Re: How to do a goto with Applescript?
      • From: Skeeve <email@hidden>
    • Re: How to do a goto with Applescript?
      • From: Alex Zavatone <email@hidden>
References: 
 >How to do a goto with Applescript? (From: Robert Poland <email@hidden>)
 >Re: How to do a goto with Applescript? (From: AndrĂ© Renault <email@hidden>)
 >Re: How to do a goto with Applescript? (From: Robert Poland <email@hidden>)
 >Re: How to do a goto with Applescript? (From: Michelle Steiner <email@hidden>)
 >Re: How to do a goto with Applescript? (From: "Mark J. Reed" <email@hidden>)
 >Re: How to do a goto with Applescript? (From: Robert Poland <email@hidden>)
 >Re: How to do a goto with Applescript? (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: How to do a goto with Applescript?
  • Next by Date: Re: How to do a goto with Applescript?
  • Previous by thread: Re: How to do a goto with Applescript?
  • Next by thread: Re: How to do a goto with Applescript?
  • Index(es):
    • Date
    • Thread