home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
- CORONADO ENTERPRISES
-
- TURBO PASCAL TUTOR - Version 2.6
-
-
-
- This documentation and the accompanying software, including all of
- the example Pascal programs and text files, are protected under
- United States copyright law to protect them from unauthorized
- commercialization. This version of the tutorial is distributed
- under the shareware concept, which means you are not required to
- pay for it. You are permitted to copy the disks, and pass copies
- on to a friend, provided you do not modify any files or omit any
- files from the complete package. In fact, you are encouraged to
- pass complete copies on to friends. You are permitted to charge
- a small fee to cover the costs of duplication, but you are not
- permitted to charge anything for the software itself.
-
- If you find the tutorial helpful, you are encouraged to register
- with the author and to submit a small fee to help compensate him
- for his time and expense in writing it. We will provide you with
- a beautifully printed copy of this tutorial if you sumbit a full
- registration. See the READ.ME file on either diskette for addi-
- tional details.
-
- Whether or not you send a registration fee, feel free to request
- a copy of the latest list of available tutorials and a list of
- the authorized Public Domain libraries that distribute our full
- line of programming language tutorials.
-
-
- Gordon Dodrill - Feb 4, 1991
-
-
-
- Copyright (c) 1986, 1988, 1989, 1991, Coronado Enterprises
-
-
- Coronado Enterprises
- 12501 Coronado Ave NE
- Albuquerque, New Mexico 87122
-
-
- TURBO PASCAL TUTORIAL - TABLE OF CONTENTS
-
-
- Introduction to the TURBO Pascal tutorial Page I-1
-
-
- Chapter 1 - What is a computer program? Page 1-1
-
-
- Chapter 2 - Getting started in Pascal. Page 2-1
-
- TRIVIAL.PAS The minimum Pascal program. 2-1
- WRITESM.PAS Write something out. 2-3
- WRITEMR.PAS Write more out. 2-4
- PASCOMS.PAS Pascal comments illustration. 2-4
- GOODFORM.PAS Good formatting example. 2-5
- UGLYFORM.PAS Ugly formatting example. 2-5
-
-
- Chapter 3 - The simple Pascal data types. Page 3-1
-
- INTVAR.PAS Integer variables. 3-2
- INTVAR2.PAS More integer variables. 3-3
- ALLVAR.PAS All simple variable types. 3-3
- REALMATH.PAS Real variable math example. 3-4
- INTMATH.PAS Integer variable math example. 3-4
- BOOLMATH.PAS Boolean variable math example. 3-4
- CHARDEMO.PAS Character variable demonstration. 3-6
- CONVERT.PAS Data type conversion. 3-6
- EXTINT.PAS Extended integer types. 3-6
- EXTREAL.PAS Extended real types. 3-7
-
-
- Chapter 4 - Pascal loops and control structures. Page 4-1
-
- LOOPDEMO.PAS Loop demonstration. 4-1
- IFDEMO.PAS Conditional branching. 4-2
- LOOPIF.PAS Loops and If's together. 4-3
- TEMPCONV.PAS Temperature conversion. 4-4
- DUMBCONV.PAS Poor variable names. 4-4
- REPEATLP.PAS Repeat until structure. 4-4
- WHILELP.PAS While structure. 4-5
- CASEDEMO.PAS Case demonstration. 4-5
- BIGCASE.PAS Bigger case example 4-6
-
-
-
-
-
-
-
-
-
-
-
- Chapter 5 - Pascal procedures and functions. Page 5-1
-
- PROCED1.PAS Simple procedures. 5-1
- PROCED2.PAS Procedures with variables. 5-3
- PROCED3.PAS Multiple variables. 5-5
- PROCED4.PAS Scope of variables. 5-7
- PROCED5.PAS Procedure calling procedures. 5-7
- FUNCTION.PAS An example function. 5-8
- RECURSON.PAS An example with recursion. 5-9
- FORWARD.PAS The forward reference. 5-9
- PROCTYPE.PAS The procedure type. 5-10
- FUNCTYPE.PAS The function type. 5-11
-
-
- Chapter 6 - Arrays, types, constants, & labels. Page 6-1
-
- ARRAYS.PAS Simple arrays. 6-1
- ARRAYS2.PAS Multiple arrays. 6-2
- TYPES.PAS Example of types. 6-3
- CONSTANT.PAS Example of constants. 6-4
- LABELS.PAS Label illustration. 6-6
-
-
- Chapter 7 - Strings and string procedures. Page 7-1
-
- STRARRAY.PAS Pascal strings. 7-1
- STRINGS.PAS TURBO Pascal strings. 7-1
- WHATSTRG.PAS What is a string? 7-2
-
-
- Chapter 8 - Scalars, subranges, and sets. Page 8-1
-
- ENTYPES.PAS Enumerated types. 8-1
- SUBRANGE.PAS Scaler operations. 8-2
- SETS.PAS Set operations. 8-3
- FINDCHRS.PAS Search for characters. 8-4
-
-
- Chapter 9 - Records. Page 9-1
-
- SMALLREC.PAS A small record example. 9-1
- BIGREC.PAS A large record example. 9-2
- VARREC.PAS A variant record example. 9-5
-
-
- Chapter 10 - Standard Input/Output. Page 10-1
-
- WRITELNX.PAS Generalized output statements. 10-1
- READINT.PAS Read integers from keyboard. 10-2
- READREAL.PAS Read reals from keyboard. 10-3
- READCHAR.PAS Read characters from keyboard. 10-3
- READSTRG.PAS Read a string from keyboard. 10-4
- PRINTOUT.PAS Print some data on the printer. 10-4
-
-
- Chapter 11 - Files. Page 11-1
-
- READFILE.PAS Read and display this file. 11-2
- READDISP.PAS Read and display any file. 11-3
- READSTOR.PAS Read and store any file. 11-4
- READINTS.PAS Read an integer data file. 11-6
- INTDATA.TXT Integer data file. 11-6
- READDATA.PAS Read a mixed data file. 11-7
- REALDATA.TXT Real data file. 11-7
- BINOUT.PAS Write a binary file. 11-8
- BININ.PAS Read a binary file. 11-10
-
-
- Chapter 12 - Pointers and dynamic allocation. Page 12-1
-
- POINT.PAS First pointer example. 12-1
- POINT2.PAS A new kind of pointer. 12-3
- POINTERS.PAS Example program with pointers. 12-3
- DYNREC.PAS Dynamic record allocation. 12-6
- LINKLIST.PAS An example linked list. 12-8
-
-
- Chapter 13 - Units in TURBO Pascal Page 13-1
-
- AREAS.PAS Areas of geometric shapes. 13-1
- PERIMS.PAS Perimeters of geometric shapes. 13-4
- GARDEN.PAS User of above units. 13-4
- SHAPES.PAS User of above units. 13-4
-
-
- Chapter 14 - Encapsulation & Inheritance Page 14-1
- ENCAP1.PAS First Encapsulation 14-1
- ENCAP2.PAS More Encapsulation 14-5
- INHERIT1.PAS First Inheritance 14-7
- VEHICLES.PAS An Object in a Unit 14-10
- CARTRUCK.PAS Descendant Objects 14-10
- INHERIT2.PAS Inheritance in Use 14-11
- INHERIT3.PAS Pointers and Arrays 14-11
-
-
- Chapter 15 - Virtual Methods Page 15-1
- VIRTUAL1.PAS No Virtual Yet 15-1
- VIRTUAL2.PAS Virtual Methods in use 15-2
- VIRTUAL3.PAS Virtuals and Pointers 15-3
- PERSON.PAS An Ancestor Object 15-4
- SUPERVSR.PAS Descendant Objects 15-4
- EMPLOYEE.PAS Using Virtual methods 15-5
-
-
-
-
-
-
-
-
- Chapter 16 - Complete example programs. Page 16-1
-
- AMORT1.PAS Start of amortization program. 16-1
- AMORT2.PAS Better amortization program. 16-1
- AMORT3.PAS Useable amortization program. 16-1
- AMORT4.PAS Neat amortization program. 16-1
- AMORT5.PAS Complete amortization program. 16-2
- LIST.PAS List Pascal programs. 16-3
- LIST.EXE Ready to use list program. 16-3
- TIMEDATE.PAS Get time and date. 16-3
- SETTIME.PAS Set a file's time and date. 16-4
- OT.PAS Directory list program. 16-4
- OT.DOC How to use OakTree. 16-4
-
-
-
- ABOUT THE AUTHOR
- _________________________________________________________________
-
- The author of this tutorial began programming in 1961 using FORTRAN
- on an IBM 1620. Since then, most of his career has been involved
- with designing digital logic for satellite application. In 1983,
- being somewhat burned out with logic design, he began a study of
- some of the more modern programming languages and has since made
- a complete career shift to software development. After learning
- Pascal, C was studied, followed by Modula-2 and Ada, and more
- recently C++. Rather than simply learning the syntax of each new
- language, modern methods of software engineering were studied and
- applied to effectively utilize the languages. He is currently
- employed by a large research and development laboratory where he
- continues to study, teach, and apply the newer programming
- languages.
-