Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
JOSS
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
====Do==== {{code|Do}} is similar to {{code|To}}, but branches to a subroutine. As with {{code|To}}, you can {{code|Do part}} or {{code|Do step}}. If a step is provided, that single line is run and then returns to the statement after the {{code|Do}}. If a part is provided, execution starts at the first line of the block and continues until the end of the block is reached or a {{code|Done}} statement is encountered. 01.15 Do step 7.24. 01.16 Do part 8. {{code|Do}} had one special short form for looking in keeping with it being very common in most programs. This used the {{code|times}} modifier instead of a normal {{code|for}}, in the case for simple loops. So the following lines are equivalent:{{sfn|Gimble|1967|p=66}} Do part 1 for i=1(1)5. Do part 1, 5 times. JOSS maintains a pointer to the currently executing line, which a {{code|Do}} would change. However, it included a special "parenthetic do" that could be used in direct mode to test certain sections of the code without changing the main pointer. For instance, if the program stopped due to an error and it was not clear which section caused the problem, one might test a particular subroutine with:{{sfn|Gimble|1967|p=58}} (Do part 2.)
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
JOSS
(section)
Add topic