RE: Go To Commands (AppleScript)
RE: Go To Commands (AppleScript)
- Subject: RE: Go To Commands (AppleScript)
- From: email@hidden
- Date: Thu, 18 Jul 2002 11:43:53 EDT
Dave,
Although Has spoke of Dijkstra, I don't think his answer
was necessarily adequetly clear to a neophyte AS programmer
(sorry Has: great humor, less than clear answer).
There is no "Go To" function within the standard sense of
AppleScript. Most programming languages discourage it's
usage as well; and it's considered bad form in virtually
every programming language. Instead, programmers are taught
(at least at academies of higher education) that a good
pre-planned structure can be use to obliviate the need for
such things, by nesting loops with appropriate if-then-else
statements. The closest thing you'll find in AppleScript is
the repeat/exit repeat/end repeat statements, which branch
out of a repeat loop on 'exit repeat'.
Now, having said that, I'll also mention that for most
games (in the modern sense), AppleScript is not the ideal
programming language (especially by itself), since it
doesn't provide more than rudimentary interface
capabilities to the user in the form of dialog boxes. By
comparison, most games are written in either C/C++, Pascal
or certain flavors of Basic, because they support direct
screen buffer access and/or sprites (which are objects
which move compared to the background, such as characters).
If your planned game has a strictly text interface, then AS
may be quite suitable, but for most forms of games, it
wouldn't be.
Best Wishes,
=-= Marc Glasgow
Dave Wrote:
>
Are there such things as "go to" in AppleScript? I'm
>
thinking of writing a game that requires such things.
>
>
For any of you familiar with the language of the TI
>
graphing calculator, think of labels and the goto command.
>
>
Dave
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.