Home page of Holt Software Associates  | Home page of the Turing Programming Language, the fastest way to teach programming concepts  | Home page of Holt Software's Java products  | Home page of Ready to Program with Java(tm) Technology, a Java development environment designed for education  | Information about Holt Software's courses for teachers  | Information about how to contact Holt Software  | Information about how students can purchase Holt Software's books and software  | Information about how schools and bookstores can purchase Holt Software's books and software

Holt Software Books    [Graphical Version]  |  [Printer Friendly Version]

[Cover of Book]

Turing Tutorial Guide

Limited Availability

This book has been replaced by
Introduction to Programming in Turing


Book Information

Title: Turing Tutorial Guide (Fourth Edition)
Author: J.N.P. Hume
ISBN: 0-921598-20-3
Publisher: Holt Software Associates Inc.
Binding: Softcover
Pages: 310 pgs
Price: Bookstores & Schools: $26.25    Retail: $32.80
Ordering Information: For bookstores and schools, click here for ordering information.
For individuals click here for ordering information.
Program Examples: Available [Click here for information on obtaining program examples found in Holt Software publications.]
Solutions Manual: Available [Click here for information on obtaining Solutions Manuals for Holt Software publications.]

Book Description

For high schools, this book approaches computer studies from a Computer Science perspective. For universities, this book is often used in the non-specialist courses. The books starts with chapters on the Turing environment for DOS, Macintosh and ICON. It then thoroughly covers the fundamental concepts of computer programming such as variables, expressions, repetition and selection. It also covers pixel graphics fairly early on. Later chapters cover more advanced concepts like strings, array, subprograms, and binary files, with additional chapters on sound and advanced graphics.

It is envisioned that a grade 10 course would cover the first six chapters of the Turing Tutorial Guide, a grade 11 course, the first ten chapters and a grade 12 or university course would cover the entire book.


Preface to Turing Tutorial Guide (Fourth Edition)

Scarcely any part of our lives has not been changed due to computers. Combined with our present technology of telecommunications, which includes the use of satellites and digital transmission, they have produced what is often called an information revolution.

Computer Science is concerned with the acquisition and organization of knowledge about computers and their use. As a science it is systematic in this activity; it is concerned with generalizations, structures, abstractions, models, fundamentals, and theories. Since Computer Science is an emerging science we must form new concepts. Some of these are adapted from more mature sciences. As with other sciences, mathematics is the language in which ideas and facts can be most precisely expressed. But we have in Computer Science another kind of language that did not exist before computers existed, the language of programming.

In mathematics the concept of a set of instructions that specifies a procedure by which certain ends can be accomplished in a finite number of steps pre-existed computers. It was called an algorithm. Before computers there was not much interest in devising languages to express algorithms. A computer program is an algorithm.

Learning how to program a computer has many benefits. First of all it removes some of the mystery about these machines that are everywhere. If your interests lead you into Computer Science as a field of special study, a knowledge of programming provides the basis from which other areas of the field can be explored, areas such as: design, complexity, and correctness of programs; the structure of data, of system software, and of programming languages themselves; and perhaps to the design and organization of computers.

When I began to teach I realized how true it was that you never really understand a subject until you try to explain it to someone else. In a way writing a set of instructions for a computer in the form of a program is like explaining how-to-do-it to some one else. And the computer's response tells you whether or not your program is successful in providing that explanation. It is a wonderful chance for you to clarify your thinking because a less than correct program accomplishes nothing. In this Tutorial Guide you will see, as well, that your programs must be written in such a way that not only the computer understands but also a person reading your program sees exactly what you are asking the computer to do and how it is to do it. Both the correctness and the understandability of programs are essential.

Learning to program a computer sharpens your wits at solving problems, particularly ones that are complex. You learn how to get the computer to do simple tasks first then you see how a complicated process can be built up from simple basic components. You learn to be systematic in your attack; you learn to be scientific.

This is a Guide that presents programming in what we consider to be the ideal language for a beginner, the Turing programming language. The great advantage is that Turing can serve you equally well when you become an expert. Nothing needs later to be unlearned.

I hope that I have written a book that helps you to learn and to enjoy your introduction to Computer Science.

J.N.P. Hume
University of Toronto


Table of Contents of Turing Tutorial Guide (Fourth Edition)

  • 1A. THE EDITOR FOR THE PC 1
  • The Turing Environment 1
  • Typing in the Program Window 2
  • Editing What You Have Typed 2
  • Moving the Cursor in the Program Window 3
  • Selecting a Menu Command 3
  • Saving What You Have Typed on the Disk 5
  • Your Computer Disk 5
  • Running a Turing Program 5
  • Starting a New Program 6
  • An Example Turing Program 6
  • Menu of Commands 8
  • Selecting Text in the Program Window 9
  • Using a Mouse 10
  • Editing the Program using Menu Commands 11
  • Searching for and Replacing Text 11
  • Redirecting Output to a Disk File 12
  • Input Data from a Disk File 13
  • Printing a Program or its Output 13
  • Exercises 13
  • Technical Terms 14
  • 1B. THE EDITOR FOR THE MACINTOSH 17
  • The Turing Environment 17
  • The Mouse 17
  • Startup Procedure 18
  • Selecting a Menu Command 18
  • Using the Turing System 18
  • Printing or Saving the Program or Input/Output 20
  • Running a Turing Program 21
  • Starting a New Program 24
  • An Example Turing Program 25
  • Menu of Commands 27
  • Problems 28
  • Editing The Program 28
  • Problems 29
  • Searching for and Replacing Text 30
  • Redirecting Output to the Disk 31
  • Input Data from Disk Files 33
  • Technical Terms 35
  • 1C. THE EDITOR FOR THE ICON 37
  • The Turing Environment 37
  • Moving the Cursor 38
  • Typing in the Window 38
  • Editing What You Have Typed 39
  • Erasing the Contents of the Input Window 39
  • Printing What You Have Typed 40
  • Saving What You Have Typed on the Disk 40
  • Your Computer Disk 41
  • Listing a Directory of Files on the Disk 41
  • Deleting a File from the Disk 41
  • Renaming a File on the Disk 41
  • Editing a File 42
  • Saving Turing Programs on the Disk 42
  • Problems 44
  • Editing Lines Rather than Characters 45
  • Substituting One String of Characters for Another 45
  • Problems 46
  • Redirecting Output to a Disk File 47
  • Input Data from a Disk File 47
  • Technical Terms 48
  • 2. SIMPLE PROGRAMS 49
  • A One-Line Program 49
  • Changing the Program 49
  • Substituting One String of Characters for Another 50
  • A Program that Computes 50
  • Integers and Real Numbers 51
  • Arithmetic Expressions 52
  • Combining Calculations and Messages 52
  • Output of a Series of Items 52
  • A Series of Output Statements 53
  • Exercises 54
  • Technical Terms 56
  • 3. VARIABLES AND CONSTANTS 57
  • Storing Information in the Computer 57
  • Declaring Variables 57
  • Names of Variables 58
  • Inputting Character Strings 58
  • Strings Containing Blanks 59
  • Mistakes in Programs 59
  • Inputting Numbers 60
  • Mistakes in Data 60
  • Inputting Real Numbers 61
  • Constants 62
  • Assignment of Values to Variables 62
  • Understandable Programs 63
  • Comments in Programs 64
  • Exercises 64
  • Technical Terms 65
  • 4. REPETITION 67
  • Loops 67
  • Conditional Loops 68
  • Comparisons 69
  • Comparing Strings 69
  • An Example Conditional Loop 70
  • Another Conditional Loop 71
  • Counted Loops 72
  • Indenting the Body of Loops 74
  • Loops that Count Backwards 75
  • Counted Loops with Exits 75
  • Random Exit from Loop 76
  • Compound Conditions 77
  • Exercises 78
  • Technical Terms 80
  • 5A. CHARACTER GRAPHICS 83
  • Character Locations on the Screen 83
  • Creating a Graphical Pattern with Characters 84
  • Interactive Graphics 84
  • Diagonal Lines and Patterns 85
  • Drawing in Color 87
  • Background Color 89
  • Hiding the Cursor 90
  • Animation with Graphics 90
  • Controlling the Speed of Animation 91
  • Exercises 92
  • Technical Terms 93
  • 5B. PIXEL GRAPHICS 95
  • Pixel Positions on the Screen 95
  • Plotting Dots on the Screen 95
  • Graphics Systems other than CGA 97
  • Drawing Lines 98
  • Drawing Circles and Ellipses 100
  • Animation 101
  • Drawing Arcs 102
  • Plotting a Mathematical Function 103
  • Using Text with Pixel Graphics 104
  • Background Color 105
  • Sound with Graphics 105
  • Current Values of Graphic Parameters 106
  • Exercises 106
  • Technical Terms 107
  • 6. SELECTION 109
  • Simple Selection 109
  • Three-way Selection 110
  • Multi-way Selection 111
  • Case Construct 113
  • Commands for Action 114
  • Selecting from a Menu of Commands 115
  • Exercises 116
  • Technical Terms 117
  • 7. STORING DATA ON THE DISK 119
  • Data Files on Disk 119
  • Input Data from Disk Files 120
  • End-of-file for Data 121
  • End-of-file with Strings 122
  • Reading Lines of Text from a File 123
  • Exercises 124
  • Technical Terms 125
  • 8. HANDLING STRINGS 127
  • Length of a String 127
  • Joining Strings Together 128
  • Selecting Part of a String 129
  • Searching for a Pattern in a String 131
  • Substituting one Pattern for Another 133
  • Eliminating Characters from Strings 133
  • Exercises 134
  • Technical Terms 136
  • 9. PROCESSING TEXT 137
  • Token-oriented Input 137
  • Inputting a Fixed Number of Characters 138
  • Line-oriented Input 139
  • Files on Disk 140
  • Reading one File and Writing Another 142
  • Text Formatting 144
  • Simple Language Translation 145
  • Exercises 146
  • Technical Terms 147
  • 10. PROGRAM STRUCTURE 149
  • Structure Diagrams 149
  • Nested Structures 150
  • A Loop Nested Inside a Loop 152
  • More Complicated Nesting of Structures 152
  • Structure Diagram for elsif 153
  • Declaration of Variables and Constants Inside Constructs 155
  • Design of Programs 156
  • Controlling Complexity 156
  • Exercises 157
  • Technical Terms 158
  • 11. ARRAYS AND OTHER DATA TYPES 159
  • Manipulating Lists 159
  • When to Use an Array 160
  • Initialization of Array 161
  • Sorting an Array 162
  • Related Lists 163
  • Subrange Data Types 164
  • Boolean Data Types 165
  • Tables 166
  • Named Data Types 167
  • Exercises 168
  • Technical Terms 169
  • 12. MUSIC 171
  • Playing Musical Notes 171
  • Resting for a While 172
  • Playing a Series of Notes 173
  • Using the Keyboard to Make Music 173
  • Animation with Music 174
  • Exercises 177
  • Technical Terms 179
  • 13. SUBPROGRAMS 181
  • Functions 181
  • Predefined Functions 183
  • A String-valued Function 184
  • A Procedure with no Parameters 185
  • A Procedure with one Parameter 187
  • Variable Parameters in Procedures 188
  • Predefined Procedures and Functions 189
  • Type Transfer Functions 191
  • Recursive Subprograms 191
  • Exercises 192
  • Technical Terms 193
  • 14. SUBPROGRAMS WITH ARRAY PARAMETERS 195
  • Functions with Array Parameters 195
  • Array Parameters in Procedures 196
  • Dynamic Formal Parameters 197
  • Another Example of a Procedure 198
  • An Example Using Both a Function and Procedures 200
  • Local and Global Variables and Constants 202
  • Exercises 205
  • Technical Terms 205
  • 15. RECORDS AND FILES 207
  • Declaration of Records 207
  • Inputting and Outputting Records 207
  • Arrays of Records 208
  • Binding to Records 210
  • An Example using a File of Records 210
  • Moving Records in Memory 212
  • Text Files 215
  • Binary Files 215
  • Random Access to Records on Disk 216
  • An Example of Random Access to a Binary File on Disk 217
  • Exercises 219
  • Technical Terms 220
  • 16. ADVANCED TOPICS 221
  • Binary Search 221
  • Sorting by Merging 224
  • Files of Records in Linked Lists 226
  • Highly Interactive Graphics 229
  • Exercise 233
  • Technical Terms 233
  • 17. ADVANCED PIXEL GRAPHICS 234
  • Drawing a Tilted Box 234
  • Repeating a Pattern 235
  • Animation using a Buffer 238
  • Bar Charts 239
  • Pie Charts 241
  • Graphing Mathematical Equations 243
  • Exercises 246
  • Technical Terms you should now know 247
  • Appendices

  • 1. SIMPLIFIED SYNTAX OF TURING 249
  • Programs and Declarations 250
  • Types 251
  • Subprograms 251
  • Statements and Input/Output 252
  • References and Expressions 254
  • Identifiers and Explicit Constants 256
  • 2. PREDEFINED SUBPROGRAMS 257
  • Predefined Functions 257
  • Mathematical Functions 258
  • Type Transfer Functions 259
  • Predefined Procedures 262
  • Graphics Procedures 262
  • 3. RESERVED WORDS IN TURING 265
  • 4. OPERATORS IN TURING 267
  • 5. FILE STATEMENTS 270
  • 6. CONTROL CONSTRUCTS 271
  • 7. COLORS IN TURING 272
  • 8. IBM PC KEYBOARD CODES 274
  • 9. TURING CHARACTER SET 276
  • 10. GLOSSARY OF TECHNICAL TERMS 280

  • INDEX 295

  • [ Holt Software Home ] * [ Books (Graphical) ] * [ Books (Text) ] * [ Top of Page ] * [ Feedback ]