Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
For loop
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===1982: PostScript=== {{Further|PostScript}} The for-loop, written as {{code|[initial] [increment] [limit] { ... } for}} initializes an internal variable, and executes the body as long as the internal variable is not more than the limit (or not less, if the increment is negative) and, at the end of each iteration, increments the internal variable. Before each iteration, the value of the internal variable is pushed onto the stack.<ref>{{cite book |year=1999 |title=PostScript Language Reference |publisher=Addison-Wesley Publishing Company |page=596 |isbn=0-201-37922-8}}</ref> <syntaxhighlight lang="applescript"> 1 1 6 {STATEMENTS} for </syntaxhighlight> There is also a simple repeat loop. The repeat-loop, written as {{code|X { ... } repeat}}, repeats the body exactly X times.<ref>{{cite web|url=http://pscript.dubmun.com/tutorial4.html|title=PostScript Tutorial - Loops}}</ref> <syntaxhighlight lang="applescript"> 5 { STATEMENTS } repeat </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)