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
JOSS
(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!
===Program statements=== Every line in a JOSS program must start with a line number. Line numbers are fixed-point numbers consisting of two two-digit integers separated by a period. As in BASIC, line numbers are used both as labels to target from {{code|To}} and {{code|Do}} statements, and to support editing. Entering a line of code with a new line number inserts it into a program, while entering one with an extant line number replaces the prior version or deletes it if it is empty. The portion of the line number to the left of the period is termed the ''page'' or ''part'', while the portion to the right is termed the ''line''. Thus the line number {{code|10.12}} refers to page 10, line 12. Branches can target either a page, or a line within a page. When the latter format is used, the combined page and line is termed a ''step''. Pages are used to define [[subroutine]]s, which return when the next line is on a different page. For instance, if a subroutine for calculating the square root of a number is in page 3, one might have three lines of code 3.1, 3.2 and 3.3, and it would be called using {{code|Do part 3.}} The code would return to the statement after the Do when it reaches the next line on a different page, for instance, 4.1. No need exists for the equivalent of a {{code|RETURN}} at the end, although if an early return is required, {{code|Done}} accomplishes this. Every line must start with a command keyword following the line number. No concept of a ''default command'' exists as is the case in BASIC with its optional {{code|LET}} statement. Multiple statements can be placed on one line, separated by colons or semicolons. Every line must end with a period.
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)