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
BASIC-PLUS
(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!
===Statement modifiers=== BASIC-PLUS added the concept of "statement modifiers", [[JOSS]]-like conditions that could be applied to any statement. For instance, {{code|PRINT I IF I <> 10|lang=basic}} is the equivalent of {{code|1 = IF I <> 10 THEN PRINT I|lang=basic}}{{sfn|PLUS|1972|p=8-17}} The opposite was also provided, {{code|1 = PRINT I UNLESS I = 10|lang=basic}} was the equivalent of {{code|IF I <> 10 THEN PRINT I|basic}}.{{sfn|PLUS|1972|p=8-18}} {{code|FOR}} loops worked as in other versions of BASIC, and the {{code|NEXT}} command could not be used in an expression to exit early.{{sfn|PLUS|1972|p=3-19}} Instead, the {{code|UNTIL}} and {{code|WHILE}} keywords could be used to control early exits. For instance, {{code|1 = FOR I=1 UNTIL I=10|lang=basic}} continue looping until I=10, with the assumption that following code would set the value of I,{{sfn|PLUS|1972|p=8-14}} meaning it might not exit after 10 iterations but as soon as the code set I to 10.{{sfn|PLUS|1972|p=8-15}} Modifiers could also be used to build compact one-line loops, for instance, {{code|1 = X=X+1 WHILE X<100|lang=basic}} would loop until X was 100.{{sfn|PLUS|1972|p=8-20}}
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)