COMAL_Introduction_to_Computer_Programming_with_COMAL_80.pdf

(16595 KB) Pobierz
_.
-
.....
.......
.
.
Introductlor.
-to
.....
CDmputRr
proqrllmmll'lq
.with
coma' 80
and
the
commodore 6¥128
J,
w', \\
iam
'ear~
"-
·C(
[,
[l
[-
[I
[.
[;
I
with
COMAL
80
[i
and the
co~odore
L
[i
64/128
j.
william leary, ed.d .
[i
'?
[
Cover design, illustrations and drawings:
[
[
Without the help and support of the following, this book still
an idea to pursue "tomorrow":
would
be
[
[
Dr.C. Holland, Superintendent of Schools, Pocahontas County, W. V. ;
Kenneth E. Vance, Principal, Pocahontas County High School; Dan Curry,
Curriculum Development, Pocahontas County Schools; Cora Lee Wyatt,
Treasurer; Gwennie Friel, Secretary; and, to these students for those
tedious but essential tasks of proofing, duplicating and collating, Tammy
Armstrong (first draft), Mary Kay Irvine (Girl Friday, final copy), Tina
Roach, Carl Seielstad, Carol Arbogast, Angie Matheny, Kathy Roach and
Delana Irvine.
A special thank you to Len Lindsay, Editor, COMAL TODAY, for his
supportive critique of the manuscript.
(Any errors or
obfuscous
explanations remain the responsibility of the author.)
The author is also indebted to Robert L. Poland, Richmond High School
(Indiana) --an unusually gifted teacher, for introducing him to COMAL in
the Summer of 1984.
[
[
-[
[
[
[
===========
Printed in the United States of America. Published by:
COMAL Users Group, U.S.A., Limited
6041 Monona Drive
Madison, WI 53716
Please note the following trademarks:
Captain COMAL of COMAL Users Group, U.S.A., Limited; Commodore 64 of Commodore Electronics
Limited; IBM of International Business Machines; Apple of Apple Computer;
Copyright 1985 by J. William Leary
Copyright 1986 by COMAL Users Group, U.S.A., Limited
All rights reserved. No part of this book may be reproduced in any way or by any means,
without permission in writing from the publisher.
[
[
ii
[~
1
r"
[
CONTENTS
[
[.
[
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
********
introduction
mathematical operations
introduction to programming
computer management techniques
LIST and EDIT commands
introduction to $trings
more mathematical operations
more on $trings
FOR / ENDFOR loop
counting and summing
binary decisions: IF / THEN / ELIF / ELSE / ENDIF
binary numbering system
logic operators
READ - DATA
INPUT - numerics and $trings
REPEAT - UNTIL
nested loops
WHILE - DO
CASE - OF
procedures
arrays
$tring arrays
two-dimensional arrays
sorting
introduction to files
the graphic turtle
for further study
index
iii
1
12
21
30
39
46
[
[
[
54
67
72
80
87
97
106
111
126
135
142
152
158
163
181
196
204
217
231
248
259
262
[
L
r
[
[.
t'
I[
Zgłoś jeśli naruszono regulamin