Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
BASIC09
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
===Data types=== BASIC09 included several built-in data types. In addition to the traditional string (STRING) and 40-bit floating point (REAL) types found in most BASICs of the era, it also included the 16-bit signed INTEGER, the 8-bit unsigned BYTE, and the logical BOOLEAN type. The BOOLEAN types were not [[Data structure alignment|packed]] into bytes, a single BOOLEAN used an entire 8-bit byte to store a single value. The language provided separate bytewise [[boolean function|boolean operators]] for bitwise operations on BYTEs and INTEGERs.{{sfn|Manual|1984|pp=7.2-7.6}} In contrast to other BASICs that also operated different base types, BASIC09 did not "decorate" the variable name to indicate the type, and instead used the <code>DIM</code> for definitions; for instance, <code>DIM a,b:BOOLEAN</code> to declare two BOOLEAN variables, or <code>DIM c(5):INTEGER</code> for an array of five INTEGERs.{{sfn|Manual|1984|p=7.6}} Additionally, BASIC09 included the <code>TYPE</code> keyword, which allowed compound types to be defined, with each "element" listed on a single line separated by semicolons. For instance:{{sfn|Manual|1984|p=7.8}} TYPE employee_record=name:STRING;number(2):INTEGER;former:BOOLEAN defines an employee record type named <code>employee_record</code> with three elements, <code>name</code>, <code>number</code> and <code>former</code>. The employee_record type can now be used in a definition like any other type, for instance, <code>DIM employees(100):employee_record</code>, which defines an array of 100 employee_record's. The elements are accessed in code using dot notation, for instance, <code>employees(50).name="Bob"</code>.{{sfn|Manual|1984|p=7.8}}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
BASIC09
(section)
Add topic