Changes

Jump to: navigation, search

Technical information about Locomotive BASIC

1,134 bytes added, 08:42, 25 August 2012
/* Entering BASIC programs */
== Entering BASIC programs ==
A maximum of 255 characters can be entered for a single BASIC line. This is converted into the tokenised BASIC program which is more compact than the line entered. The BASIC keywords are converted into "tokens", or 1-2 byte sequences which uniquely identify each keyword.
There are some rules for assigning names for variables:: - it is not allowed to define a variable starting with a figure (the system expect then programming mode and interpret it as a programm line number): - no space (or 'under' as it is common today) between variable names are allowed: - BASIC keywords can't be used: - different sign e.g.: a slash (doesn't depend which direction), a 'minus' sign, a 'and' sign can't be used in a variable names: - after a dollar sign (for defining string variables) it is not allowed to use further signs: - different defining functions together are not allowed (e.g. use '%' together with '$') : - you can use 40 characters for a variable name: - use ! for defining a REAL value variable (like the function DEFREAL but only for the assigned variable) > It's also possible to omit the exlamation mark because it's the default system declaration after powering on then CPC.: - use % for defining a INTEGER value variable (like the function DEFINT but only for the assigned variable): - use $ for defining a STRING variable (like the function DEFSTR but only for the assigned variable)  This is converted into the tokenised BASIC program which is more compact than the line entered. The BASIC keywords are converted into "tokens", or 1-2 byte sequences which uniquely identify each keyword.  <br>
== Structure of a BASIC program ==
205
edits