Category:Commodore BASIC: Difference between revisions

From Rosetta Code
Content added Content deleted
(Copied definition from non-category version of page.)
(copied markup)
Line 1: Line 1:
{{Implementation|BASIC}}
Commodore BASIC is the collective name for the various versions of BASIC developed by Microsoft for Commodore 8-bit computers, starting with the PET in 1977. There were several versions; see Wikipedia's Commodore BASIC page for details.
'''Commodore BASIC''' is the collective name for the various versions of [[:Category:BASIC|BASIC]] developed by [[Microsoft]] for [[Commodore]] 8-bit computers, starting with the [[wp:Commodore PET|PET]] in 1977. There were several versions; see [[wp:Commodore BASIC|Wikipedia's Commodore BASIC page]] for details.

Commodore BASIC is notable for its lack of integer arithmetic; all operations were carried out in floating-point, which made the interpreter slower than some of its peers.
Commodore BASIC is notable for its lack of integer arithmetic; all operations were carried out in floating-point, which made the interpreter slower than some of its peers.

Programs were tokenized into bytecode, although many characters were left intact to facilitate printing the source code back out in original form; it's one of the few BASICs of the time that preserved whitespace (though not leading whitespace). Unlike some contemporary BASICs, it supported arrays of strings, and arrays could have thousands of elements as long as there was sufficient memory for them (but strings were limited to 255 bytes).
Programs were tokenized into [[wp:bytecode|bytecode]], although many characters were left intact to facilitate printing the source code back out in original form; it's one of the few BASICs of the time that preserved whitespace (though not leading whitespace). Unlike some contemporary BASICs, it supported arrays of strings, and arrays could have thousands of elements as long as there was sufficient memory for them (but strings were limited to 255 bytes).
The most well-known version is 2.0, which came with the VIC-20 and Commodore 64. Despite the impressive sound and graphics capabilities of the machines, the language had no support for them; machine code was required to take advantage of those features. Later BASIC versions added support, but the later machines that came with those versions never came close to the popularity of the 64.

In addition to the sound and graphic statements, the later versions also introduced structured programming constructs: DO...LOOP, which supported both pre- and post-evaluated conditions (DO WHILE/UNTIL ... LOOP and DO ... LOOP WHILE/UNTIL) as well as unconditional loop exit (EXIT) and BEGIN...BEND code blocks, which allowed multi-line conditional clauses. However, other limitations remained: variables were still all global and limited to 2-letter names, user-defined functions were restricted to a single expression with a single argument, etc.
The most well-known version is 2.0, which came with the [[wp:Commodore VIC-20|VIC-20]] and [[wp:Commodore 64|Commodore 64]]. Despite the impressive sound and graphics capabilities of the machines, the language had no support for them; machine code was required to take advantage of those features. Later BASIC versions added support, but the later machines that came with those versions never came close to the popularity of the 64.

In addition to the sound and graphic statements, the later versions also introduced structured programming constructs: <code>DO...LOOP</code>, which supported both pre- and post-evaluated conditions (<code>DO WHILE/UNTIL ... LOOP</code> and <code>DO ... LOOP WHILE/UNTIL</code>) as well as unconditional loop exit (<code>EXIT</code>) and <code>BEGIN...BEND</code> code blocks, which allowed multi-line conditional clauses. However, other limitations remained: variables were still all global and limited to 2-letter names, user-defined functions were restricted to a single expression with a single argument, etc.

Revision as of 04:37, 19 February 2013

Commodore BASIC is an implementation of BASIC. Other implementations of BASIC.

Commodore BASIC is the collective name for the various versions of BASIC developed by Microsoft for Commodore 8-bit computers, starting with the PET in 1977. There were several versions; see Wikipedia's Commodore BASIC page for details.

Commodore BASIC is notable for its lack of integer arithmetic; all operations were carried out in floating-point, which made the interpreter slower than some of its peers.

Programs were tokenized into bytecode, although many characters were left intact to facilitate printing the source code back out in original form; it's one of the few BASICs of the time that preserved whitespace (though not leading whitespace). Unlike some contemporary BASICs, it supported arrays of strings, and arrays could have thousands of elements as long as there was sufficient memory for them (but strings were limited to 255 bytes).

The most well-known version is 2.0, which came with the VIC-20 and Commodore 64. Despite the impressive sound and graphics capabilities of the machines, the language had no support for them; machine code was required to take advantage of those features. Later BASIC versions added support, but the later machines that came with those versions never came close to the popularity of the 64.

In addition to the sound and graphic statements, the later versions also introduced structured programming constructs: DO...LOOP, which supported both pre- and post-evaluated conditions (DO WHILE/UNTIL ... LOOP and DO ... LOOP WHILE/UNTIL) as well as unconditional loop exit (EXIT) and BEGIN...BEND code blocks, which allowed multi-line conditional clauses. However, other limitations remained: variables were still all global and limited to 2-letter names, user-defined functions were restricted to a single expression with a single argument, etc.

Subcategories

This category has the following 3 subcategories, out of 3 total.

Pages in category "Commodore BASIC"

The following 158 pages are in this category, out of 158 total.