Holt Software Books [Graphical Version] | [Printer Friendly Version]
![[Cover of Book]](img/oot_ref_man.gif) |
Object Oriented Turing Reference Manual
|
| Title: |
Object Oriented Turing Reference Manual (Seventh Edition) |
| Authors: |
R.C. Holt and Tom West |
| ISBN: |
0-921598-35-1 |
| Publisher: |
Holt Software Associates Inc. |
| Binding: |
Softcover |
| Pages: |
870 pgs |
| Price: |
Bookstores & Schools: $33.00 Retail: $41.25 |
| Ordering Information: |
For bookstores and schools, click here for
ordering information. For individuals click
here for ordering information. |
The Object Oriented Turing Reference Manual is the reference work
for the current implementations of Object Oriented Turing. It contains an
introduction to the language, a description of the Turing environment
for Microsoft Windows, the Apple Macintosh and MS-DOS, and an alphabetical
description of each element of the Object Oriented Turing language including
a breakdown by module of the built-in modules in Object Oriented Turing. It
also contains 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 Microsoft Windows, the Apple
Macintosh and MS-DOS describe the editor, including menus and dialog boxes
There is a chapter describing the GUI module, which is a module that allows
OOT programs to create and control buttons, check boxes, radio buttons,
text boxes, and many other graphical user interface elements. The chapter
introduces and illustrates each element.
The next chapter is a short reference to importing external graphics into
Turing. The information in this chapter allow BMP, PCX and PICT images to
be displayed by Object Oriented Turing programs.
The bulk of the books is comprised of the language features section.
Every element of the Object Oriented Turing languages is
listed alphabetically, one per page with accompanying examples.
Appendices provide lists of all predefined keywords, predefined subprograms
for Turing and Object Oriented Turing, operators, file statements,
control constructs, keyboard codes and character sets.
Example Feature Listing of Object Oriented 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.
See also predefined unit Text.
|
Table of Contents for Object Oriented Turing Reference Manual (Seventh Edition)
1. INTRODUCTION 1
Language Evolution 1
Other Material about Turing 1
Two Main Implementations: Turing and OOT 2
Using Turing and OOT for Teaching 2
Design of the Language 3
Dirt and Danger 3
Implementing Turing and OOT 4
Basic Concepts in Turing 4
Compile-Time Expressions 6
Documentation of Language Features 6
OOT Predefined Units 7
Changes to OOT 8
2. OOT FOR WINDOWS 9
Installing OOT for Windows 9
Minimum System Requirements 9
Installing Under Windows 3.1 9
De-installing Under Windows 3.1 12
Enabling Virtual Memory Under Windows 3.1 12
Changing Monitor Resolution Under Win 3.1 12
Installing Under Windows 95 14
MS Windows Drivers for WinOOT 15
Using OOT for Windows 16
Starting WinOOT 16
WinOOT Environment 17
OOT Windows - Control Panel 18
OOT Windows - Directory Viewer 20
OOT Windows - Editor Window 21
OOT Windows - Error Viewer 22
OOT Windows - Run Window 23
OOT Windows - Debugger Window 24
Editing Text - Keyboard Editing Commands 26
Editing Text - Selection, Cutting and Pasting 27
Editing Text - Searching and Replacing Text 27
Running Programs - Input and Output Redirection 29
Running Programs - Programs with Multiple Parts 31
Menu Commands - Control Panel 32
Menu Commands - Directory Viewer 34
Menu Commands - Editor Window 36
Debugging - Stepping and Tracing 40
Debugging - Showing Variables 42
Tutorial 45
3. OOT FOR MACINTOSH 49
Installing OOT for Macintosh 49
Minimum System Requirements 49
Installing Under Macintosh 49
De-installing OOT for Macintosh 52
Using OOT for Macintosh 53
Starting MacOOT 53
MacOOT Environment 53
MacOOT Windows - Editor Window 55
MacOOT Windows - Run Window 56
MacOOT Windows - Debugger Window 57
MacOOT Windows - Debugging Controller 59
MacOOT Windows - Error Viewer 60
Editing Text - Keyboard Editing Commands 61
Editing Text - Selection, Cutting and Pasting 62
Editing Text - Searching and Replacing Text 62
Running Programs - 64
Input and Output Redirection 64
Running Programs - 66
Programs with Multiple Parts 66
Menu Commands 67
Debugging - Stepping and Tracing 72
Showing Variables 74
Tutorial 77
4. OOT FOR DOS 81
Installing OOT for DOS 81
Minimum System Requirements 81
Installing Under DOS 81
De-installing Under DOS 85
Using OOT for DOS 86
Starting DOS OOT 86
Selecting a Menu Item in DOS OOT 87
Loading a Program in DOS OOT 88
Editing a Program in DOS OOT 90
Saving a Program in DOS OOT 92
Running a Program in DOS OOT 93
To Exit DOS OOT 93
OOT for DOS Editor Reference 94
The Menu Commands: 94
The Window Commands 99
Selecting Text 99
Mouse Movement 100
Dialog Boxes 101
The Pick File 114
Start Up Options 115
Compilation to Executable File 119
Input and Output Redirection 119
Summary 120
5. THE GUI MODULE 123
Introduction 123
Terms 125
Example Programs 125
General Principles of the GUI Library 125
Active and Passive Widgets 127
Keyboard Shortcuts 130
Background Color 130
Widget Sizes 131
Positioning Text Labels (Aligning Labels with Widgets) 132
Canvases 133
Multiple Windows 135
The GUI Library Internals 136
GUI Module Routines Summary 138
Widgets - Common Routines 141
Widgets - Buttons 142
Widgets - Check Boxes 143
Widgets - Radio Buttons 145
Widgets - Picture Buttons 146
Widgets - Picture Radio Buttons 147
Widgets - Sliders 148
Widgets - Scroll Bars 150
Widgets - Canvases 152
Widgets - Text Fields 154
Widgets - Text Boxes 155
Widgets - Lines 156
Widgets - Frames 157
Widgets - Labelled Frames 158
Widgets - Labels 159
Widgets - Pictures 160
Widgets - Menus 161
Widgets - General Routines 162
6. IMPORTING GRAPHICS INTO TURING 165
Introduction 165
Importing BMP Images in WinOOT 165
Pic.ScreenLoad 166
Pic.ScreenSave 167
Importing PICT Images in MacOOT 167
Pic.ScreenLoad 167
Pic.ScreenSave 168
Importing PCX Images in DOS OOT 168
PCX2TM2 168
Pic.ScreenLoad 170
Pic.ScreenSave 171
7. LANGUAGE FEATURES 173
abs - absolute value function 174
addr - address of a variable 175
addressint - type 176
all - all members of a set 177
and - operator 178
anyclass - the ancestor of all classes 179
arctan - arctangent function (radians) 180
arctand - arctangent function (degrees) 181
array - type 182
assert - statement 186
assignability - of expression to variable 187
assignment - statement 189
begin - statement 190
bind - declaration 191
bits - extraction 192
body - declaration 193
boolean - true-false type 195
break - debugger pause statement 196
buttonchoose - switch mouse modes 197
buttonmoved - has a mouse event occurred 198
buttonwait - get a mouse event procedure 200
case - selection statement 202
catenation (+) - joining together strings 203
ceil - real-to-integer function 204
char - type 205
char(n) - type 207
cheat - type cheating 209
checked - compiler directive 211
chr - integer-to-character function 212
class - declaration 213
clock - millisecs used procedure 219
close - file statement 220
cls - clear screen graphics procedure 221
collection - declaration 222
color - text color graphics procedure 224
colorback - background color procedure 225
comment - remark statement 226
comparisonOperator 227
Concurrency 228
Concurrency.empty 229
Concurrency.getpriority 230
Concurrency.setpriority 231
Concurrency.simutime 232
condition - declaration 233
Config 235
Config.Display 236
Config.Lang 237
Config.Machine 238
const - constant declaration 239
constantReference - use of a constant 240
cos - cosine function (radians) 241
cosd - cosine function (degrees) 242
date - procedure 243
declaration - create a variable 244
deferred - subprogram declaration 246
delay - procedure 247
Dir 248
Dir.Change 249
Dir.Close 250
Dir.Create 251
Dir.Current 252
Dir.Delete 253
Dir.Get 254
Dir.GetLong 255
Dir.Open 257
div - integer truncating division operator 258
Draw 259
Draw.Arc 260
Draw.Box 261
Draw.Cls 262
Draw.Dot 263
Draw.Fill 265
Draw.FillArc 266
Draw.FillBox 267
Draw.FillMapleLeaf 268
Draw.FillOval 269
Draw.FillPolygon 270
Draw.FillStar 271
Draw.Line 272
Draw.MapleLeaf 273
Draw.Oval 274
Draw.Polygon 275
Draw.Star 276
Draw.Text 277
drawpic - graphics procedure 278
empty - condition function 279
enum - enumerated type 280
enumeratedValue - enumerated value 281
eof - end-of-file function 282
equivalence - of types 283
erealstr - real-to-string function 285
Error 286
Error.Last 287
Error.LastMsg 288
Error.LastStr 289
Error.Msg 290
Error.Str 291
Error.Trip 292
ErrorNum 293
Exceptions 294
exit - statement 295
exp - exponentiation function 296
explicitCharConstant - character literal 297
explicitConstant - literal 298
explicitIntegerConstant - integer literal 299
explicitRealConstant - real literal 300
explicitStringConstant - string literal 301
explicitTrueFalseConstant - boolean literal 303
expn - expression 304
export - list 305
external - declaration 307
false - boolean value (not true) 309
fetcharg - fetch argument function 310
File 311
File.Copy 312
File.Delete 313
File.DiskFree 314
File.Exists 315
File.Rename 316
File.Status 317
flexible - array initialization 319
floor - real-to-integer function 320
Font 321
Font.Draw 322
Font.Free 323
Font.GetName 324
Font.GetSize 325
Font.GetStyle 326
Font.Name 327
Font.New 328
Font.Sizes 331
Font.StartName 332
Font.StartSize 333
Font.Width 334
for - statement 335
fork - statement 337
forward - subprogram declaration 338
frealstr - real-to-string function 340
free - statement 341
function - declaration 342
functionCall 344
get - file statement 345
getch - get character procedure 349
getchar - get character function 350
getenv - get environment function 351
getpid - get process id function 352
getpriority - function 353
GUI 354
GUI.AddLine 355
GUI.AddText 356
GUI.Alert[2,3,Full] 357
GUI.Choose[Full] 359
GUI.ClearText 361
GUI.CloseWindow 362
GUI.CreateButton[Full] 364
GUI.CreateCanvas[Full] 367
GUI.CreateCheckBox[Full] 370
GUI.CreateFrame 373
GUI.CreateHorizontalScrollBar[Full] 375
GUI.CreateHorizontalSlider 379
GUI.CreateLabel[Full] 381
GUI.CreateLabelledFrame 383
GUI.CreateLine 385
GUI.CreateMenu 387
GUI.CreateMenuItem[Full] 390
GUI.CreatePicture 391
GUI.CreatePictureButton[Full] 393
GUI.CreatePictureRadioButton[Full] 396
GUI.CreateRadioButton[Full] 400
GUI.CreateTextBox[Full] 403
GUI.CreateTextField[Full] 406
GUI.CreateVerticalScrollBar[Full] 409
GUI.CreateVerticalSlider 413
GUI.Disable 416
GUI.Dispose 418
GUI.Draw... 419
GUI.Enable 421
GUI.FontDraw 422
GUI.GetCheckBox 423
GUI.GetEventTime 424
GUI.GetEventWidgetID 425
GUI.GetEventWindow 426
GUI.GetHeight 427
GUI.GetMenuBarHeight 428
GUI.GetScrollBarWidth 429
GUI.GetSliderValue 430
GUI.GetText 431
GUI.GetVersion 432
GUI.GetWidth 433
GUI.Get{X,Y} 434
GUI.Hide 435
GUI.HideMenuBar 436
GUI.OpenFile 437
GUI.OpenFileFull 438
GUI.Pic... 440
GUI.ProcessEvent 441
GUI.Quit 443
GUI.Refresh 444
GUI.SaveFile 445
GUI.SaveFileFull 446
GUI.SelectRadio 448
GUI.SetActive 450
GUI.SetBackgroundColor 451
GUI.SetCheckBox 452
GUI.SetDefault 453
GUI.SetDisplayWhenCreated 454
GUI.SetKeyEventHandler 455
GUI.SetLabel 456
GUI.SetMouseEventHandler 457
GUI.SetNullEventHandler 459
GUI.SetPosition 460
GUI.SetPositionAndSize 461
GUI.SetScrollAmount 462
GUI.SetSelection 465
GUI.SetSize 467
GUI.SetSliderMinMax 468
GUI.SetSliderReverse 469
GUI.SetSliderSize 470
GUI.SetSliderValue 471
GUI.SetText 472
GUI.SetXOR 473
GUI.Show 474
GUI.ShowMenuBar 475
handler - exception handler 476
hasch - has character function 479
id - (identifier) name of an item in a program 480
if - statement 481
#if - used for conditional compilation 483
implement - clause 484
implement by - clause 486
import - list 487
in - member of a set 489
include - source files 490
index - find pattern in string function 492
indexType 493
indirection - operator (@) 494
infix - operator 495
inherit - inheritance clause 497
init - array initialization 500
Input 501
Input.getch 502
Input.getchar 503
Input.hasch 504
Input.Pause 505
int - integer type 506
intn - n-byte integer type 508
intreal - integer-to-real function 509
intstr - integer-to-string function 510
invariant - assertion 511
Joystick 512
Joystick.GetInfo 513
length - of a string function 515
Limits 516
ln - natural logarithm function 517
locate - procedure 518
locatexy - graphics procedure 519
loop - statement 520
lower - bound 521
Math 522
max - maximum function 523
maxcol - maximum column function 524
maxcolor - graphics function 525
maxint - maximum integer function 526
maxnat - maximum natural number function 527
maxrow - maximum row function 528
maxx - graphics function 529
maxy - graphics function 530
min - minimum function 531
minint - minimum integer function 532
minnat - minimum natural number function 533
mod - modulo operator 534
module - declaration 535
monitor - declaration 539
Mouse 542
Mouse.ButtonChoose 543
Mouse.ButtonMoved 545
Mouse.ButtonWait 547
Mouse.Hide 549
Mouse.Show 550
Mouse.Where 551
Music 553
Music.Play 554
Music.PlayFile 555
Music.Sound 557
Music.SoundOff 558
named - type 559
nargs - number of arguments 560
nat - natural number type 561
natn - n-byte natural number type 563
natreal - natural number to real function 564
natstr - natural-number-to-string function 565
Net 566
Net.BytesAvailable 567
Net.CharAvailable 568
Net.CloseConnection 569
Net.HostAddressFromName 570
Net.HostNameFromAddress 571
Net.LineAvailable 572
Net.LocalAddress 573
Net.LocalName 574
Net.OpenConnection 575
Net.OpenURLConnection 578
Net.TokenAvailable 579
Net.WaitForConnection 580
new - statement 581
nil - pointer to a collection 583
not - true/false (boolean) operator 584
objectclass - of a pointer 585
opaque - type 586
open - file statement 587
or - operator 590
ord - character-to-integer function 591
palette - graphics procedure 592
parallelget - parallel port function 593
parallelput - parallel port procedure 594
paramDeclaration - parameter declaration 595
pause - statement 598
PC 599
PC.InPort 600
PC.InPortWord 601
PC.Interrupt 602
PC.InterruptSegs 604
PC.OutPort 605
PC.OutPortWord 606
PC.ParallelGet 607
PC.ParallelPut 608
PC.SerialGet 610
PC.SerialHasch 612
PC.SerialPut 613
pervasive - declaration modifier 615
Pic 616
Pic.Draw 617
Pic.FileNew 619
Pic.Free 621
Pic.New 622
Pic.Save 623
Pic.ScreenLoad 625
Pic.ScreenSave 627
play - procedure 628
playdone - function 629
pointer - type 630
post - assertion 633
pre - assertion 634
precedence - of operators 635
pred - predecessor function 637
prefix - operator 638
procedure - declaration 639
procedureCall - statement 641
process - declaration 643
program - a (main) program 645
put - statement 646
quit - fail statement 648
Rand 650
rand - random real number procedure 651
Rand.Int 652
Rand.Next 653
Rand.Real 654
Rand.Reset 655
Rand.Seed 656
Rand.Set 657
randomize - procedure 658
read - file statement 659
real - the real number type 661
realn - n-byte real number type 662
realstr - real-to-string function 663
record - type 664
register - use machine register 665
rem - remainder operator 666
repeat - make copies of string function 667
result - statement 668
return - statement 669
RGB 670
RGB.AddColor 671
RGB.GetColor 672
RGB.maxcolor 673
RGB.SetColor 674
round - real-to-integer function 675
scalar - type 676
seek - (file) statement 677
self - pointer to current object 678
separator - between tokens in a program 679
serialget - serial port function 680
serialput - serial port procedure 681
set - type 682
setConstructor 683
setpriority - procedure 684
setscreen - graphics procedure 685
shl - shift left operator 688
shr - shift right operator 689
sign - function 690
signal - wake up a process statement 691
simutime - simulated time function 692
sin - sine function (radians) 693
sind - sine function (degrees) 694
sizeof - size of a type 695
sizepic - graphics function 696
skip - used in get statement 697
skip - used in put statement 699
sound - statement 700
Sprite 701
Sprite.Animate 702
Sprite.ChangePic 703
Sprite.Free 704
Sprite.Hide 705
Sprite.New 707
Sprite.SetHeight 708
Sprite.SetPosition 709
Sprite.Show 710
sqrt - square root function 711
standardType 712
statement 713
statementsAndDeclarations 715
Str 716
Stream 717
Stream.eof 718
Stream.Flush 719
Stream.FlushAll 720
string - comparison 721
string - type 722
strint - string-to-integer function 723
strintok - string-to-integer function 724
strnat - string to natural number function 725
strnatok - string to natural number function 726
strreal - string-to-real function 727
strrealok - string-to-real function 728
subprogramHeader 729
subprogramType 730
subrangeType 731
substring - of another string 732
succ - successor function 733
Sys 734
Sys.Exec 735
Sys.FetchArg 736
Sys.GetEnv 737
Sys.GetPid 738
Sys.Nargs 739
sysclock - millisecs used procedure 740
system - statement 741
tag - statement 743
takepic - graphics procedure 744
tell - file statement 746
Text 747
Text.Cls 748
Text.Color 749
Text.ColorBack 750
Text.Locate 751
Text.LocateXY 752
Text.maxcol 753
Text.maxrow 754
Text.WhatChar 755
Text.WhatCol 756
Text.WhatColor 757
Text.WhatColorBack 758
Text.WhatRow 759
Time 760
Time.Date 761
Time.DateSec 762
Time.Delay 763
Time.Elapsed 764
Time.ElapsedCPU 765
Time.PartsSec 766
Time.Sec 767
Time.SecDate 768
Time.SecParts 769
time - time of day as a string procedure 770
token - in input 771
true - boolean value (not false) 772
TypeConv 773
type - declaration 775
typeSpec - type specification 776
unchecked - compiler directive 778
union - type 779
unit - file containing module, monitor, or class 781
unqualified - export 783
upper - bound 784
var - declaration 785
variableReference - use of a variable 786
View 787
View.ClipAdd 788
View.ClipOff 789
View.ClipSet 790
View.GetActivePage 791
View.GetVisiblePage 792
View.maxcolor 793
View.maxx 794
View.maxy 795
View.Set 796
View.SetActivePage 799
View.SetVisiblePage 801
View.WhatDotColor 803
wait - block a process statement 804
wallclock - seconds since 1/1/1970 procedure 805
whatcol - cursor position function 806
whatcolor - text color graphics function 807
whatcolorback - color of background function 808
whatdotcolor - graphics function 809
whatpalette - graphics function 810
whatrow - cursor position function 811
whattextchar - graphics function 812
whattextcolor - graphics function 813
whattextcolorback - graphics function 814
Window 815
Window.Close 816
Window.GetActive 817
Window.GetPosition 818
Window.GetSelect 819
Window.Hide 820
Window.Open 821
Window.Select 822
Window.Set 823
Window.SetActive 825
Window.SetPosition 826
Window.Show 827
write - file statement 828
xor - exclusive "or" operator 830
Appendices
A. Predefined Subprograms and Keywords 831
B. OOT Predefined Subprograms 834
C. Turing Predefined Subprograms 852
D. Operators 860
E. File Statements 863
F. Control Constructs 864
G. IBM PC Keyboard Codes 865
H. Turing (IBM PC) Character Set 867
[ Holt Software Home ] *
[ Books (Graphical) ] *
[ Books (Text) ] *
[ Top of Page ] *
[ Feedback ]