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
Sinclair BASIC
(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!
==Notes== {{reflist|30em|group="note"|refs= <ref group="note" name="logical">"False" in Sinclair BASIC equates to 0 (zero), everything else equates to "true". Functions that return true-or-false values thus actually return 0 for false and 1 for true, while <code>AND</code> usually returns the first of the conditions supplied for true, or 1 if no numerical values were given. For example, <code>6 AND 7</code> returns 6, while <code>NOT 6=7</code> returns 1.</ref> <ref group="note" name="microdrivecommands"><code>CAT</code>, <code>ERASE</code>, <code>FORMAT</code> and <code>MOVE</code> were originally designed to be used with peripherals, but at the launch of ZX Spectrum, they had not been completely implemented, such that their use generated an error message (Invalid Stream). Later with the aid of the ZX Interface 1 shadow ROM, they were used for the [[ZX Microdrive]]. (The shadow ROM was paged when the BASIC interpreter detected a syntax error, which is why most ZX Microdrive commands use a <code>"*"</code>).</ref> <ref group="note" name="if-else">Unlike many other BASIC dialects, Sinclair Basic did not include the <code>ELSE</code> operator in the <code>IF</code>β<code>THEN</code>[β<code>ELSE</code>] clause. A workaround would be to use an <code>IF</code>β<code>THEN</code>β<code>GO TO</code> construct instead, bypassing the lines that would have been in an <code>ELSE</code> clause with the <code>GO TO</code></ref> <ref group="note" name="colournumbers">The available numbers for colours are: {| class="wikitable" | 1 || 2 || 3 || 4 || 5 || 6 || 7 || 0 |- | style="font-weight:bold;background-color:#000000;" | {{font color|blue|blue}} || style="font-weight:bold;background-color:#000000;" | {{font color|red|red}} || style="font-weight:bold;background-color:#000000;" | {{font color|magenta|magenta}} || style="font-weight:bold;background-color:#000000;" | {{font color|green|green}} || style="font-weight:bold;background-color:#000000;" | {{font color|cyan|cyan}} || style="font-weight:bold;background-color:#000000;" | {{font color|yellow|yellow}} || style="font-weight:bold;background-color:#000000;" | {{font color|white|white}} || style="font-weight:bold;background-color:#ffffff;" | {{font color|black|black}} |} In all colour-related commands, the number 8 may be used to indicate "transparent" while in <code>INK</code> and <code>PAPER</code> may also be set to 9 for "contrast" β that is, to put a dark colour on a light background or vice versa automatically.</ref> <ref group="note" name="colours"><code>INK</code>, <code>PAPER</code>, <code>FLASH</code>, <code>BRIGHT</code>, <code>OVER</code> and <code>INVERSE</code> set attributes for outputting text and graphics to the screen. They can be used either as commands, to apply to all subsequent output until set again, or within a <code>PRINT</code> statement, to apply only from that point until the end of the statement.</ref> }}
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)