Commodore BASIC is the dialect of BASIC used in Commodore International's 8-bithome computer line, stretching from the PET of 1977 to the C128 of 1985. The core part was based on 6502Microsoft BASIC, licensed from the young, cash-strapped Microsoft on a "pay once, no royalties" basis. As such it shares most of the core code with other 6502 BASICs of the time, such as Applesoft BASIC (which, like CBM BASIC, was flat-fee-licenced from Microsoft; ultimately very bad deals for MS, considering the high sales of Apple's and particularly Commodore's 8-bit home computers).
A very convenient feature of Commodore's ROM-resident BASIC interpreter and KERNAL was the brilliantly implemented full screen editor, which allowed users to input, edit, and enter direct commands as well as program lines anywhere on the screen – simply by pressing the RETURN key whenever the cursor happened to be on a line containing a valid BASIC statement. This marked a huge leap forward in program entry interfaces compared to other common home computer BASICs at the time, which typically used a separate EDIT command, or the like, to enable line editing.
Like the original Microsoft BASICinterpreter, which it is based on, Commodore BASIC is known to be woefully slow compared to machine code. Test results have shown that copying 16 kilobytes of memory from ROM to RAM takes less than a second in machine code, but over 10 minutes in BASIC. To try to make up for the slowness of the interpreter, programmers started using various tricks to speed up execution. One idea was to store often-used integer values into variables rather than using them as literal values, as interpreting a variable name was faster than interpreting a literal number.
Despite what every BASIC textbook says, the order of execution of Commodore BASIC lines did not follow the line numbering. Instead it followed the order in which the lines were stored in memory. When entering code with the on-screen editor, the lines were automatically reordered to follow the line numbers, but by POKE-ing directly into the memory where the program was stored, you could mess up the line numbering, even give every line the same number! However, the same feature could also be used to renumber a program if so needed, e.g. to allow for inserting new lines between existing ones if the programmer had initially (by bad habit) used "increase by 1" line numbering.
Commodore BASIC tokens could be shortened by entering only the first letter, followed by a shifted version of the second letter (the shifted version appeared as a graphics symbol). The shortened token was equivalent to the full token and appeared as the full token when LIST-ing the program.
The native number format of Commodore BASIC, like that of its parent MS BASIC, was floating point. (All arithmetic was done using these floating point numbers; integer calculations were performed via conversion to and from floating point.) Most of the contemporary BASIC implementations used one byte for the characteristic (exponent) and three bytes for the mantissa. This led to problems in business applications since the accuracy of a floating point number using a three-byte mantissa is only about 6.5 decimal digits, and round-off error is common. Commodore, however, elected for a four-byte mantissa, which made their BASIC much more adapted for business than most other BASICs of the era.