Computer_Programs_that_Work!.pdf
(
6219 KB
)
Pobierz
•
-
'.
~
"'"
..
~
1
l
COMPUTER PROGRAMS THAT WORK:
fUlly
tested mathematics, science
&,
games programs in
BASIC
by
/I
1
\
d D ;'. '"
~ ~
~,
G"
;"
,!ir
SIGMf ,ECHNICAL PRE SS
(Wolverhamr(
1
11
90391
copyright(§)1978 by Sigma Technical Press
All rights reserved.
NO
part
of
this book
or
associated computer readable materials supplied
with it
or
reproduced
from
it may
be
reproduced by any means (including
photographic, photocopying, electronic
or
any computer process) without
the prior permission
of
the publisher. The only exceptions are
for
the purposes
of
review
or
in
order to
enter the programs described
herein onto
a
computer for the sole
use of
the purchaser
of
this book.
ISBN:
o
905104
03
x
"11)
Sigma Technical Press
23 Dippons Mill Close
Tettenhall
Wolverhampton WV6 8HH
UK
Sc.,cSJct
.!!(
PREFACE
This book aims to provide first time computer users with a wide
range of reliable and extensively. tested programs for use on a computer
terminaL These cover some commonly used statistical and numerical
calculations, simulations and calculations involving Biology, Chemistry and
Physics, together with a selection of popular games which are useful for
demonstration purposes. Some readers will gratefully accept the statistical
programs as a means of calculating results, without any attempt to under-
stand the working of the program. Others
will
initially run the games, and
having become familiar with using a terminal may
be
motivated to learn
BASIC, to examine the working of these programs and to write their own
programs.
The BASIC language features available differ considerably from one
computer to another. To aid the transferability of these programs, they
arc deliberately written using an elementary subset of BASIC, which should
be available to all users. The following technical points are worthy of note:
(i)
«
~.
All arrays and character strings are declared in the first line of th:
program.
Strings are assumed to handle one character per element.
Though the circumflex • is the recommended arithmetic operator
for raising to the power, some compilers only accept
t
or **.
Wherever possible Z**2 has been replac,ed
by
Z*Z and so on.
The use of the logical operators AND and OR in IF statements is
avoided.
Some random number generators always produce the same sequence
of numbers, starting at the same place. To avoid the repetition of
the same sequence of games, users are invited to type in the time,
or a lucky number, which is used to call a few random
numbers~
On some computers this may be simplified using RANDOMISE or
RND(-l).
The functions MAT READ, MAT ZER, and MAT CON are used to
read data into a matrix, or to set the elements to zero or one.
They can
be
replaced by a READ or a LET statement inside a FOR
loop to read or set the array elements appropriately.
Except in the atomic orbital program the use of character sub-
str ings is a voided.
Conditional branch·statements (GOTO OF or ON GOTO) are avo'ided
except in the program on atomic orbitals.
In
the trial runs, all data input by the user is preceded by the
prompt
?
and a space.
(ii)
(iii)
(iv)
(V)
(vi)
(vii)
(viii)
(ix)
J.
D.
Lee, G. Beech, T. D. Lee
February 1978
iii
Plik z chomika:
Amiga2509
Inne pliki z tego folderu:
50_Outstanding_Programs_for_the_VIC-20_Second_Edition.pdf
(46148 KB)
1541_Users_Guide.pdf
(34354 KB)
1001_Things_to_do_with_your_Commodore_128.pdf
(24107 KB)
1001_Things_to_do_with_your_Commodore_64.pdf
(7837 KB)
30_Hour_Basic_Commodore_64_Edition.pdf
(24150 KB)
Inne foldery tego chomika:
Add-ons
Zgłoś jeśli
naruszono regulamin