Recursive Procedures; Predefined Subprograms
In the preceding chapter, we described a procedure that was called after having been declared. This is not the only kind of call Possible or practicable. Any procedure, whether a function procedure or a proper one can call itself with another list of actu
- PDF / 12,300,319 Bytes
- 240 Pages / 439.32 x 665.88 pts Page_size
- 11 Downloads / 193 Views
Introduction to SIMULA 67
G. Lamprecht
lntroduction to SIMULA 67
Günther Lamprecht
lntroduction to
SIMULA67
Springer Fachmedien Wiesbaden
CIP·Kurztitelaufnahme der Deutschen Bibliothek
lamprecht, Giinther: Introduction to SIMULA 67 [sixty·sevenj / Gunther Lamprecht. - Braunschweig; Wiesbaden: Vieweg, 1981. Dt. Ausg. u.d.T.: Lamprecht, Gunther: Einfuhrung in die Programmiersprache SIMULA ISBN 3·528·03340·1
1981 AII rights reserved © Springer Fachmedien Wiesbaden 1981 UrsprOnglich Erschienen bei Friedr, Vieweg & Sohn Verlagsgesellschaft mbH, Braunschweig 1981 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any torm or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior permission of the copyright holder.
ISBN 978-3-528-03340-8 ISBN 978-3-663-14077-1 (eBook) DOI 10.1007/978-3-663-14077-1
To my aunt Änne Frische Preface
This introduction to SIMULA 67 is based on several courses held since 1974 at the computing center of the University of Bremen. The courses and this book are meant for students of every faculty, and they will find an easy way to the use of a computer by the explanation of solving simple problems. The programming language SIMULA 67 has been developed by 0. J. Dahl, B. Myhrhaug and K. Nygaard of the Norwegian Computing Center, Oslo. lt is a superset of ALGOL 60 and so the language has a great tool to describe the solution of a complex problern in a clear way. The solutions to all the examples and exercises have been put through on the computer IRIS 80 of the University of Bremen and the results are given and explained in a separate solution chapter. Thus, you have the chance to test your own solution. Finally, I would like to thank Mrs. the English manuscript.
A. Frische and Mrs. C. Raymond for polishing
Bremen, September 1980
G. Lamprecht
Contents
1. A simple Programing Example . . . . . . . . . . . . . . .
1
2. Whole Numbers, Analysis of Arithmetic Expressions
6
3. GOTO-Statement, Loops, and BOOLEAN Variables
11
4. Polynomials, Vectors, and Matrices .
23
5. Input of Data Cards (Standard Input)
31
40
6. Printout (Standard Output) . . . . . . 7. Treating Texts . . . . . . . . . . . . . . . .
. ..... .
46
8. Program Structure: Compound Statements, Blocks, Subprograms .
66
9. Recursive Procedures; Predefined Subprograms ... .
82
10. Classes as Compound Objects . . . . . . . . . . . . . . . . 11. Classes with Statements, Classes as a Program System
90 . 107
12. Coroutines ...
. . 115
13. List Processing .
. 123
14. Simulation ...
. 131
15. Approaching Files.
. 143
Salutions to Exercises and Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Appendix
A:
Internal Representation of Numbers . . . . . . . . . . .
. 214
B:
Reserved and Predefined Names
............ .
. 217
C:
Characters Used in SIMULA and Their Significance.
. . 219
0:
System Classes SIMSET and SIMULATION
.. 220
E:
Generating Random Numbers . . . . . . . . .
. . 226
References
. .
Data Loading...