This chapter lists BASIC 7.0 language elements and describe how to use those elements. It gives a complete list of the rules (syntax) of Commodore 128 BASIC 7.0, along with a concise description of each.
Basic 7.0 includes all the elements of BASIC 2.0. The new commands, statements, functions and operators provided in Basic 7.0 are shown as follows:
AUTOand commands which have been modified are as follows:
RUN / RUN
The different types of BASIC operations are listed in individual sections, as follows:
The boldface line that defines the format consists of the following elements:
DLOAD "program name" [D0,U8] ^ ^ ^ | | | additional arguments keyword argument +-- (possibly optional)
The parts of the command or statement that must be typed exactly are shown in capital letters. Words the user supplies, such as the name of a program, are not capitalized.
When quote marks (" ") appear (usually around a program name or file name), the user should include them in the appropriate place, according to the format example.
KEYWORDS, also called reserved words, appear in upper case letters. Keywords may be typed using the full word or the approved abbreviation (a full list is given in Appendix K). The keyword or abbreviation must be entered correctly or an error will result. The BASIC and DOS error messages are defined in Appendices A and B, respectively.
Keywords are words that are part of the BASIC language. The are the central part of a command or statement, and the tell the computer what kind of action to take. These words cannot be used as variable names. A complete list of reserved words is given in Section 20.
ARGUMENTS, also called parameters, appear in lower case letters. Arguments complement keywords by providing specific information to the command or statement. For example, the keyword LOAD tells the computer to load a program while the argument tells the computer which specific program to load. A second argument specifies from which drive to load the program. Arguments include filenames, variables, line numbers, etc.
SQUARE BRACKETS [ ] show optional arguments. The user selects any or none of the arguments listed, depending on requirements. The user should not type the SQUARE BRACKETS, which are only there to describe the format.
ANGLE BRACKETS < > indicate the user MUST choose one of the arguments listed. The user should not type the ANGLE BRACKETS, which are only there to describe the format.
A VERTICAL BAR | seperates items in a list of arguments when the choices are limited to those arguments listed. When the vertical bar appears in a list enclosed by SQUARE BRACKETS, the choices are limited to the items in the list, but the user still has the option not to use any arguments.
ELIPSIS ... a sequence of three dots means an option or argument can be repeated more than once. The user should not type the ELIPSIS, which is only there to describe the format.
QUOTATION MARKS " " enclose character strings, filenames and other expressions. When arguments are enclosed in quotation marks, the quotation marks must be included in the command or statement. Quotations marks are not conventions used to describe formats; they are required parts of a command or statement.
PARENTHESES ( ) When arguments are enclosed in parentheses, they must be included in the command or statement. Parentheses are not conventions used to describe formats; they are required parts of a command or statement.
VARIABLE refers to any valid BASIC variable name, such as X, A$, T%, etc.
EXPRESSION refers to any valid BASIC expression, such as A+B+2, 5*(X+3), etc.
COMMAS (,) COLONS (:) and SEMICOLONS (;) These MUST be included, they are required parts of the command or statement.
Optional parameters in Graphics and Sound commands are represented like this:
When parameters are omitted the comma MUST be included, this is because the parameters are position dependent. You must not, however, include commas after the last specified parameter.
ENVELOPE n [,atk] [,dec] [,sus] [,rel] [,wf] [,pw]
To alter just the rel parameter, use:
The first three commas mark the positions of atk, dec, sus and the fourth is the comma for rel. The commas for wf and pw must not be entered.
In the GRAPHICS commands whenever there is a coordinate specified by (X,Y) it is possible to replace this with a vector (X;Y). In this case:
LOCATE 160,100 DRAW TO 40;45will draw a line at 45 degrees of length 40.
Optional parameters in disk commands are shown thus:
The comma is not required if the parameter is the first after the command itself. If other parameters which require commas are omitted the commas should be omitted too.
DIRECTORY [Ddrive][<ON | ,>Udevice number] [,wildcard]would in full produce:
DIRECTORY D0 ON U8,"AB*"
To specify only the wild card, no comma is required, i.e.
Whenever variables are used in disk commands the MUST be enclosed in parentheses ( ). For example:
page URL: www.bigfoot.com/~c128page/c128sg/sect-16.htm