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!
===1980: Maple=== {{Further|Maple (software)}} Maple has two forms of for-loop, one for iterating over a range of values, and the other for iterating over the contents of a container. The value range form is as follows: '''for''' ''i'' '''from''' ''f'' '''by''' ''b'' '''to''' ''t'' '''while''' ''w'' '''do''' ''# loop body'' '''od'''; All parts except <code>'''do'''</code> and <code>'''od'''</code> are optional. The <code>''' for''' ''I''</code> part, if present, must come first. The remaining parts (<code>'''from''' ''f''</code>, <code>'''by''' ''b''</code>, <code>'''to''' ''t''</code>, <code>'''while''' ''w''</code>) can appear in any order. Iterating over a container is done using this form of loop: '''for''' ''e'' '''in''' ''c'' '''while''' ''w'' '''do''' ''# loop body'' '''od'''; The <code>''' in''' ''c''</code> clause specifies the container, which may be a list, set, sum, product, unevaluated function, array, or object implementing an iterator. A for-loop may be terminated by <code>'''od'''</code>, <code>'''end'''</code>, or <code>'''end do'''</code>.
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)