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
Integer 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!
===Mathematics=== Integer BASIC, as its name implies, uses integers as the basis for its math package. These were stored internally as a 16-bit number, [[Endianness|little-endian]] (as is the 6502). This allowed a maximum value for any calculation between -32767 and 32767; although the format could also store the value -32768, BASIC could not display that number. Calculations that resulted in values outside that range produced a {{code|>32767 ERR}}.{{sfn|Raskin|1978|p=27}} Infix operators included {{code|+}} (addition), {{code|-}} (subtraction), {{code|*}} (multiplication), {{code|/}} (division), [[Modulo operation|MOD]] (remainder) and exponent using the {{code|^}} character. Binary operators included {{code|AND}}, {{code|OR}} and {{code|NOT}}. Binary comparisons included the standard set of {{code|{{=}}}}, {{code|>}}, {{code|<}}, {{code|>{{=}}}}, {{code|<{{=}}}}, {{code|<>}} and the HP-inspired {{code|#}}, which was equivalent to <>.{{sfn|Raskin|1978|p=61}} Only single-dimension arrays were allowed, limited in size only by the available memory.{{sfn|Raskin|1978|p=94}} Mathematical functions were sparse; only {{code|ABS}} (absolute value), {{code|SGN}} (sign) and {{code|RND}} (random number) were supported.{{sfn|Raskin|1978|p=40,120}} In contrast to MS-derived versions, where the parameter was ignored and {{code|RND}} always returned a value 0..<1, Integer BASIC used the parameter; {{code|RND(6)}} returned an integer from 0 to 5.{{sfn|Raskin|1978|p=40}}
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)