BASIC

Peter Kitson

ISBN : -

Order a printed copy of this book from Amazon --UNAVAILABLE--


Cover Design - BASIC
 

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)

Numbers

 




Sample Chapter From BASIC
     Copyright © Datrmouth College



WHAT IS A PROGRAM?


A program is a set of directions, a recipe, that is used to provide an answer to some problem. It usually consists of a set of instructions to be performed or carried out in a certain order. It starts with the given data and parameters as the ingredients, and ends up with a set of answers as the cake. And, as with ordinary cakes, if you make a mistake in your program, you will end up with something else -- perhaps hash!

Any program must fulfill two requirements before it can even be carried out. The first is that it must be presented in a language that is understood by the "computer." If the program is a set of instructions for solving linear equations, and the "computer" is a person, the program will be presented in some combination of mathematical notation and English. If the person solving the equations is a Frenchman, the program must be in French. If the "computer" is a high speed digital computer, the program must be presented in a language the computer can understand.

The second requirement for all programs is that they must be completely and precisely stated. This requirement is crucial when dealing with a digital computer, which has no ability to infer what you meant -- it can act only upon what you actually present to it.

We are of course talking about programs that provide numerical answers to numerical problems. To present a program in the English language, while easy on the programmer, poses great difficulties for the computer because English, or any other spoken language, is rich with ambiguities and redundancies, those qualities which make poetry possible but computing impossible. Indeed, you present your program in a language that resembles ordinary mathematical notation, which has a simple vocabulary and grammar, and which permits a complete and precise specification of your program. The language that you will use is BASIC (Beginner's All purpose Symbolic Instruction Code) which is at the same time precise, simple, and easy to understand.

Your first introduction to the BASIC language will be through an example. Next you will learn how to use the Dartmouth Time Sharing System to execute BASIC programs. Finally, you will study the language in more detail with emphasis on its rules of grammar and on examples that show the application of computing to a wide variety of problems.