RTR logo

R. T. RUSSELL

BBC BASIC (86) Manual



Statements and Functions

Introduction

The commands and statements are listed alphabetically for ease of reference; they are not separated into two sections.

All statements, except INPUT, can also be used as direct commands.

Where appropriate, the abbreviated form is shown to the right of the statement.

The associated keywords are listed at the end of each explanation.

If the lexical analyser tries to expand a line to more than 255 characters, a 'Line space' error will be reported.

BIGBASIC

Please refer to the Annex entitled BIGBASIC for details of those keywords which behave differently if you are using this version of BBC BASIC (86).

Single Key Entry

Single key entry of selected keywords is provided; these keywords are listed below. To obtain the keyword hold down the ALT key and press the appropriate letter (the keys are the same as those used on the Acorn Electron). Note that PRINT is obtained by holding ALT and pressing the forward slash (/) key.

Single Key Keyword Entry
Alt/AAUTO Alt/NNEXT
Alt/BRENUMBER Alt/OOLD<Enter>
Alt/CCOLOUR Alt/PPLOT
Alt/DDRAW Alt/QLOCAL
Alt/EELSE Alt/RRUN<Enter>
Alt/FFOR Alt/SSTEP
Alt/GGOTO Alt/TTHEN
Alt/HDEG Alt/UUNTIL
Alt/IINPUT Alt/VVDU
Alt/JRAD Alt/WRESTORE
Alt/KCHAIN Alt/XPROC
Alt/LLIST Alt/YREPEAT
Alt/MMODE Alt/ZEND
Alt//PRINT   

Syntax

Abbreviated definitions for the commands and statements in BBCBASIC(86) are given at the end of the explanation for each keyword. Most of us have seen formal syntax diagrams and Backus-Naur Form (BNF) definitions for languages, and many of us have found them to be somewhat confusing. Consequently, we have attempted to produce something which, whilst being reasonably precise, is readable by the majority of BBCBASIC(86) users. To those amongst you who would have preferred 'the real thing' - we apologise.

Symbols

The following symbols have special meaning in the syntax definitions.
{ } The enclosed item may be repeated zero or more times.
[ ] The items enclosed are optional, they may occur zero or one time.
| Indicates alternatives; one of which must be used.
<stmt> Means a BBCBASIC(86) statement.
<var> Means a numeric or string variable.
<exp> Means an expression like PI*radius*height+2 or name$+"FRED"+CHR$(&0D). It can also be a single variable or constant like 23 or "FRED".
<l-num> Means a line number in a BBCBASIC(86) program.
<k-num> Means the number of one of the programmable keys.
<n-const> Means a numeric constant like '26.4' or '256'.
<n-var> Means a numeric variable like 'size' or 'weight'.
<numeric> Means a <n-const> or a <n-var> or an expression combining them. For example: PI*radius+2.66
<s-const> Means a string constant like "FRED".
<string> Means an unquoted string of characters.
<s-var> Means a string variable like 'address$'.
<str> Means a <s-const> or a <s-var> or an expression combining them. For example: name$+add$+"Phone".
<t-cond> Means a 'testable condition'. In other words, something which is either TRUE or FALSE. Since BBCBASIC does not have true Boolean variables, TRUE and FALSE are numeric (with a value of -1 and 0). Consequently, a <numeric> can be used anywhere a <t-cond> is specified.
<name> Means a valid variable name.
<d:> Means a disk drive name (A: to P:).
<dirtry> Means a directory path-name.
<afsp> Means an ambiguous file specifier.
<ufsp> Means an unambiguous file specifier.
<nchr> Means a character valid for use in a name. 0 to 9, A to Z, a to z and underline.

Left CONTENTS

CONTINUE Right


Best viewed with Any Browser Valid HTML 3.2!
© Doug Mounter and Richard Russell