Basics Of Basic; Number Please - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

Basics of BASIC
Virtually all home computers provide a language known as BASIC, which allows
programs to be written in the nearest thing to plain language presently available.
BASIC no longer has any particular significance as to the degree ofthe sophistication
of the language, and many extremely complex and powerful programs are written
using BASIC.
However, there's no doubt that the name has attracted many newcomers for its
promise of providing a starting place in the maze of computer program languages,
and this has contributed significantly to its universality.
BASIC is a computer language that interprets a range of permitted commands, and
then performs operations on data while the program runs. Unlike the average human
vocabulary of 5000-8000 words (plus all the different ways verbs can be used etc,)
BASIC has to get by with about two hundred. Computer programs written using
BASIC have to follow rigid rules concerning the use of these words. The syntax is
precise, and any attempt to communicate with the computer using literal or
colloquial expressions (Le. plain language) will result in the cold and clinical
message:
Syntax error
This is not as restrictive as it first appears, since the language of BASIC (the syntax)
is primarily designed to manipulate numbers - the numeric data. The words are
essentially an extension of the familiar mathematical operators +/- etc., and the
most important concept for newcomers to grasp is the fact that a computer can only
work with numeric data. Information that is supplied to the CPU (Central Processor
Unit) integrated circuit is only supplied in the form of numerical data.
Number please ....
Ifa computer is used to store the complete works of Shakespeare, there will not be a
single letter or word to be found anywhere in the system. Every piece of information
is first converted into a number which the computer can locate and manipulate as
required.
BASIC interprets the words as numbers which the computer can then manipulate
using only addition, subtraction and features from Boolean logic that permit the
computer to compare data and select for certain attributes - in other words, check to
see if one number is greater than or the same as another, or to perform a defined task
if one number or another meets certain criteria.
Through the medium of the program, the computer breaks down every task into a
simple series ofY es/N
0
operations.
At your leisure ....
Chapter 9 Page 7

Advertisement

Table of Contents
loading

Table of Contents