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
MBASIC
(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!
=== Variables and data types === MBASIC supported the following data types: * 8-bit character data, in strings of length 0 to 255 characters; * 16-bit [[integer]]s; * 32-bit [[floating point]] (single precision), equivalent to six decimal digits, with a two-digit exponent; * 64-bit floating point (double precision), equivalent to sixteen decimal digits, with a two-digit exponent. String operators included substring selection, concatenation, assignment, and testing for equality. Arrays of the above types were allowed with up to 7 dimensions, but no functions or operators worked on arrays; for example, there was no assignment of arrays. Unlike some other BASIC implementations of the time, MBASIC did not provide support for [[matrix (mathematics)|matrix]] operations, [[complex number]]s, or a [[binary-coded decimal|decimal (BCD)]] data type for financial calculations. All floating point operations were carried out in software since typical CP/M systems did not have [[floating-point unit|floating point hardware]]. The built-in mathematics functions ([[sine and cosine|sine, cosine]], [[tangent]], [[natural logarithm|natural log]], [[exponential function|exponential]], [[square root]]) only gave single precision results. A software [[pseudorandom number generator]] was provided; this relied on the user to key in a seed number to obtain a sequence of numbers useful for games and some simulations. MBASIC permitted but did not require the <code> LET </code> keyword for assignment statements. Early versions of BASIC on [[microcomputer]]s were infamous for one- or two-character variable names, which made the meanings of variables difficult to recall in complex programs. MBASIC version 5 allowed identifiers up to 40 characters long, which permitted programmers to give variables readable names.
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)