Holt Software Books [Graphical Version] | [Printer Friendly Version]
![[Cover of Book]](img/turing_ref_man.gif) |
Turing Reference Manual
|
| Title: |
Turing Reference Manual (Seventh Edition) |
| Author: |
R.C. Holt and Tom West |
| ISBN: |
0-921598-34-3 |
| Publisher: |
Holt Software Associates Inc. |
| Binding: |
Softcover |
| Pages: |
310 pgs |
| Price: |
Bookstores & Schools: $28.00 Retail: $35.00 |
| Ordering Information: |
For bookstores and schools, click here for
ordering information. For individuals click
here for ordering information. |
The Turing Reference Manual is the reference work for the current
implementations of Turing. It contains an introduction to the language,
a description of the Turing environment for the PC and the Apple Macintosh,
an alphabetical description of each element of the Turing languages, and
a full set of appendices.
The introduction covers the basic concepts of the language, as well as
a description of the terminology used in the reference manual.
The chapters on the Turing environment for MS-DOS and Macintosh describe
the editor, including menus and dialog boxes. The MS-DOS chapter also covers
various start-up options for Turing and instructions for the various
support programs that come with Turing for testing the graphics
capability of the system and file integrity. There is also a section
on Writing Large Programs in Turing. This covers all the error
messages and work-arounds that one can use when writing very large
programs in Turing.
There is a chapter on importing graphics into Turing. This section details
all the information needed to import PCX or PICT images into Turing programs.
The bulk of the books is comprised of the language features section.
Every element of the Turing languages is listed alphabetically, one
per page with accompanying examples.
Appendices provide lists of all predefined keywords, predefined subprograms
for Turing, operators, file statements, control constructs, keyboard codes
and character sets.
Example Feature Listing of Turing Reference Manual
locate |
procedure |
Char & pixel graphics only |
| Syntax |
locate (row, column : int) |
| Description |
The locate procedure is used to move the cursor so that the
next output from put will be at the given row and column.
Row 1 is the top of the screen and column 1 is the left
side of the screen.
|
| Example |
This program outputs stars of random colors to random locations
on the screen. The variable colr is purposely spelled differently
from the word color to avoid the procedure of that name (used to
set the color of output). The row number is purposely chosen so
that it is one less than maxrow. This avoids the scrolling of
the screen which occurs when a character is placed in the last
column of the last row.
|
setscreen ("screen")
var row, column, colr : int
loop
randint (row, 1, maxrow - 1)
randint (column, 1, maxcol)
randint (colr, 0, maxcolor)
color (colr)
locate (row, column)
put "*" .. % Use dot-dot to avoid clearing end of line
end loop
| Details |
The locate procedure is used to locate the next output based
on row and column positions. See also the locatexy procedure
which is used to locate the output based x and y positions,
where x=0, y=0 is the left bottom of the screen.
The screen should be in a "screen" or "graphics" mode. See the
setscreen procedure for details. If the screen is not
in one of these modes, it will automatically be set to
"screen" mode.
|
| See also |
setscreen and drawdot. |
Table of Contents for Turing Reference Manual (Seventh Edition)
1. INTRODUCTION 1
Language Evolution 1
Other Material About Turing 1
Two Main Implementations: Turing and OOT 1
Design of the Language 2
Basic Concepts in Turing 3
Compile-Time Expressions 4
Documentation of Language Features 5
2. USING TURING ON IBM PC COMPATIBLES 9
What You Need 7
Introduction 7
Installation 10
Windows 95/98 Note 10
Running Turing from Microsoft Windows 11
Windows 3.1 11
Windows 95 and later 11
Running Turing in a Window 12
The Editor 12
Starting Up 12
Selecting a Menu Item 14
Loading a Program 15
Editing a Program 17
Saving A Program 19
Running a Program 20
Editor Reference Section 20
The Menu Commands 21
The Window Commands 26
Selecting Text 26
Mouse Movement 27
The Dialog Boxes 28
The Pick File 40
Start Up Options 40
Printing in the Turing System 44
TComp: The Turing Compiler 45
Using SCRNTEST 47
Using CRC 48
Large Programs in Turing 48
Advanced Turing Features and Options 54
3. USING TURING ON APPLE MACINTOSHES 57
Getting Started 59
Editing a Program 61
The Edit Menu 64
Printing a Program 65
The Search Menu 67
Running a Program 73
Setting Preferences 75
Compiling an Application 77
Changing Defaults 79
Turing Files 81
4. IMPORTING GRAPHICS INTO TURING 83
Introduction 83
Importing PCX Images in PC Turing 83
PCX2TM2 84
SCRNFL2.T 86
SCRNFL2.T file - Procedure Summary 86
SCRNFL2.T file - Example Programs 86
Importing PICT Images in MacTuring 87
5. LANGUAGE FEATURES 85
abs - absolute value function 90
all - all members of a set 91
and - operator 92
arctan - arctangent function (radians) 93
arctand - arctangent function (degrees) 94
array - type 95
assert - statement 97
assignability - of expression to variables 98
assignment - statement 100
begin - statement 101
bind - declaration 102
body - declaration 103
boolean - true-false type 105
buttonchoose - switch mouse modes 106
buttonmoved - has a mouse event occurred 107
buttonwait - get a mouse event procedure 109
case - selection statement 111
catenation (+) - joining together strings 112
ceil - real-to-integer function 113
chr - integer-to-character function; 114
clock - millisecs used procedure 115
close - file statement 116
cls - clear screen graphics procedure; 117
collection - declaration 118
color - text color graphics procedure; 120
colorback - background color procedure 121
comment - remark statement 122
comparisonOperator - 123
const - constant declaration 124
constantReference - use of a constant 125
cos - cosine function (radians) 126
cosd - cosine function (degrees) 127
date - procedure 128
declaration - create a variable 129
delay - procedure 131
div - integer truncating division operator 132
drawarc - graphics procedure 133
drawbox - graphics procedure 134
drawdot - graphics procedure 135
drawfill - graphics procedure 137
drawfillarc - graphics procedure 138
drawfillbox - graphics procedure 139
drawfillmapleleaf - graphics procedure 140
drawfilloval - graphics procedure 141
drawfillpolygon - graphics procedure 142
drawfillstar - graphics procedure 143
drawline - graphics procedure 144
drawmapleleaf - graphics procedure 145
drawoval - graphics procedure 146
drawpic - graphics procedure 147
drawpict - graphics import procedure 148
drawpolygon - graphics procedure 149
drawstar - graphics procedure 150
enum - enumerated type 151
enumeratedValue - enumerated value 152
eof - end-of-file function 153
equivalence - of types 154
erealstr - real-to-string function 156
exit - statement 157
exp - exponentiation function 158
explicitConstant - literal 159
explicitIntegerConstant - integer literal 160
explicitRealConstant - real literal 161
explicitStringConstant - string literal 162
explicitTrueFalseConstant - boolean literal 163
expn - expression 164
export - list 165
false - boolean value (not true) 166
fetcharg - fetch argument function 167
floor - real-to-integer function 168
for - statement 169
forward - subprogram declaration 171
frealstr - real-to-string function 173
free - statement 174
function - declaration 175
functionCall 177
get - file statement 178
getch - get character procedure 181
getenv - get environment function 182
getpid - get process id function 183
hasch - has character function 184
id - (identifier) name of an item in a program 185
if - statement 186
import - list 188
in - member of a set 190
include - source files 191
index - find pattern in string function 193
indexType 194
infix - operator 195
init - array initialization 197
inport - direct memory access function 198
int - integer type 199
intreal - integer-to-real function 200
intstr - integer-to-string function 201
invariant - assertion 202
length - of a string function 203
ln - natural logarithm function 204
locate - procedure 205
locatexy - graphics procedure 206
loop - statement 207
lower - bound 208
max - maximum function 209
maxcol - maximum column function 210
maxcolor - graphics function 211
maxrow - maximum row function 212
maxx - graphics function 213
maxy - graphics function 214
min - minimum function 215
mod - modulo operator 216
module - declaration 217
mousehide - hide the mouse cursor 221
mouseshow - show the mouse cursor 222
mousewhere - get mouse cursor location 223
named - type 224
nargs - number of arguments 225
new - statement 226
nil - pointer to a collection 227
not - true/false (boolean) operator 228
opaque - type 229
open - file statement 230
or - operator 233
ord - character-to-integer function 234
outport - direct memory access procedure 235
palette - graphics procedure 236
parallelget - parallel port function 237
parallelput - parallel port procedure 238
paramDeclaration - parameter declaration 240
peek - direct memory access function 242
play - procedure 243
playdone - function 244
pointer - type 245
poke - direct memory access procedure 247
post - assertion 248
pre - assertion 249
precedence - of operators 250
pred - predecessor function 251
prefix - operator 252
procedure - declaration 253
procedureCall - statement 255
program - a (main) program 256
put - statement 257
rand - random real number procedure 259
randint - random integer procedure 260
randnext - procedure 261
randomize - procedure 262
randseed - procedure 263
read - file statement 264
real - the real number type 266
realstr - real-to-string function 267
record - type 268
repeat - make copies of string function 269
result - statement 270
return - statement 271
round - real-to-integer function 272
scalar - type 273
seek - (file) statement 274
separator - between tokens in a program 275
serialget - serial port function 276
serialput - serial port procedure 277
set - type 278
setcolor - palette setting procedure 279
setcolormap - palette setting procedure 280
setConstructor 281
setscreen - graphics procedure 282
sign - function 285
sin - sine function (radians) 286
sind - sine function (degrees) 287
sizepic - graphics function 288
skip - used in get statement 289
skip - used in put statement 291
sound - statement 292
sqrt - square root function 293
standardType 294
statement 295
statementsAndDeclarations 297
string - comparison 298
string - type 299
strint - string-to-integer function 300
strintok - string-to-integer function 301
strreal - string-to-real function 302
strrealok - string-to-real function 303
subprogramHeader 304
subrangeType 305
substring - of another string 306
succ - successor function 307
sysclock - millisecs used procedure 308
system - statement 309
tag - statement 311
takepic - graphics procedure 312
tell - file statement 314
time - time of day as a string procedure 315
token - in input 316
true - boolean value (not false) 317
type - declaration 318
typeSpec - type specification 319
union - type 320
unqualified - export 322
upper - bound 323
var - declaration 324
variableReference - use of a variable 325
wallclock - seconds since 1/1/1970 procedure 326
whatcol - cursor position function 327
whatcolor - text color graphics function 328
whatcolorback - color of background function 329
whatdotcolor - graphics function 330
whatpalette - graphics function 331
whatrow - cursor position function 332
whattextchar - graphics function 333
whattextcolor - graphics function 334
whattextcolorback - graphics function 335
write - file statement 336
Appendices
A. Predefined Subprograms and Keywords 339
B. Turing Predefined Subprograms 341
C. Colors in Turing 349
D. Operators 350
E. File Statements 353
F. Control Constructs 354
G. IBM PC Keyboard Codes 355
H. Turing Character Set 357
INDEX 685
[ Holt Software Home ] *
[ Books (Graphical) ] *
[ Books (Text) ] *
[ Top of Page ] *
[ Feedback ]