Skip to main content
main-content

Inhaltsverzeichnis

Frontmatter

1. The BASIC language

Abstract
Before commencing the programming exercises which make up the majority of this book we must first define the language we are going to use. BASIC, in common with all computer languages, exists in a number of dialects and it is only in the case of very simple programs that one written for one computer will run without modification on another. The generally accepted “standard” form of BASIC is known as Microsoft (TM) and it is around this version of the language that these programming examples are designed. BASIC consists of a number of “reserved” keywords and symbols. These are bound together in a formal structure of statements which are always preceded by a number known as a “line number”.
P. E. Gosling

2. Seeking out errors

Abstract
Any manual which gives details of the version of the BASIC language applicable to a particular microcomputer will list the possible errors which can be detected and the messages which BASIC sends you on their detection. Some of these messages are fairly easy to understand; the word syntax covering a wide variety of errors in many cases but usually indicating that a misuse of the BASIC language has taken place. This often happens when keywords are either mis-spelt, used in the wrong way or keywords which do not exist in your version of the language have been used. The program listed in example 2.1 is a case in point.
P. E. Gosling

3. Some simple programming problems

Abstract
This section suggests a number of real life problems for you to try. Each one of them is presented as a statement of a problem, some suggestions of the approach you could make towards the solution, the test data you could try with your finished program and a speciment of the results you should get when the suggested data is used with your program.
P. E. Gosling

4. Real life problems

Abstract
In this section you will be given a number of real life problems together with the relevant data and some suggestions as to how the problems might be approached. They are really an extension of the examples in the previous section but are more complex in that they need files of data and the programs you write will have to manipulate the data on these files.
P. E. Gosling

5. Using random access files

Abstract
The final section of this book gives you a start in the use of random, or direct, access files. The important feature that these files have that serial files do not is that any record in the file can be read from or written to directly and without reference to any other records in the file. Once the file has been opened we can access any record for reading or writing without any change in mode. To open a random file we have to use the instruction
$$ OPEN\,R,fn,FILENAME $$
where fn is the logical number of the file within that program. Each record on the file is allowed to be up to 28 bytes in length and each record can only contain string data.
P. E. Gosling
Weitere Informationen