Quick start manual
v
String parameters. . . . . . . . . . . . . . . . 6-15
Array parameters. . . . . . . . . . . . . . . .6-16
Open array parameters. . . . . . . . . . .6-16
Variant open array parameters . . . . . .6-18
Default parameters. . . . . . . . . . . . . . .6-19
Default parameters and
overloaded routines. . . . . . . . . . . . 6-20
Default parameters in forward
and interface declarations . . . . . . . . 6-20
Calling procedures and functions . . . . . . . .6-20
Open array constructors . . . . . . . . . . . .6-21
Chapter 7
Classes and objects 7-1
Class types . . . . . . . . . . . . . . . . . . . . . 7-2
Inheritance and scope . . . . . . . . . . . . . 7-3
TObject and TClass . . . . . . . . . . . . . 7-3
Compatibility of class types . . . . . . . . 7-3
Object types . . . . . . . . . . . . . . . . . 7-4
Visibility of class members . . . . . . . . . . 7-4
Private, protected, and
public members . . . . . . . . . . . . . . 7-5
Published members. . . . . . . . . . . . . 7-5
Automated members . . . . . . . . . . . . 7-6
Forward declarations and
mutually dependent classes . . . . . . . . . 7-6
Fields . . . . . . . . . . . . . . . . . . . . . . . . 7-7
Methods. . . . . . . . . . . . . . . . . . . . . . . 7-8
Method declarations
and implementations. . . . . . . . . . . . . 7-8
Inherited . . . . . . . . . . . . . . . . . . . 7-9
Self . . . . . . . . . . . . . . . . . . . . . . 7-9
Method binding . . . . . . . . . . . . . . . . 7-10
Static methods. . . . . . . . . . . . . . . .7-10
Virtual and dynamic methods. . . . . . . 7-11
Abstract methods . . . . . . . . . . . . . .7-12
Overloading methods . . . . . . . . . . . . .7-12
Constructors . . . . . . . . . . . . . . . . . . 7-13
Destructors . . . . . . . . . . . . . . . . . . .7-15
Message methods . . . . . . . . . . . . . . .7-15
Implementing message methods . . . . . 7-16
Message dispatching . . . . . . . . . . . .7-17
Properties . . . . . . . . . . . . . . . . . . . . . .7-17
Property access . . . . . . . . . . . . . . . . . 7-18
Array properties . . . . . . . . . . . . . . . .7-20
Index specifiers . . . . . . . . . . . . . . . . .7-21
Storage specifiers . . . . . . . . . . . . . . . . 7-22
Property overrides and redeclarations . . . . 7-23
Class references . . . . . . . . . . . . . . . . . . 7-24
Class-reference types . . . . . . . . . . . . . 7-24
Constructors and class references . . . . 7-25
Class operators . . . . . . . . . . . . . . . . 7-25
The is operator . . . . . . . . . . . . . . . 7-26
The as operator. . . . . . . . . . . . . . . 7-26
Class methods . . . . . . . . . . . . . . . . . 7-26
Exceptions . . . . . . . . . . . . . . . . . . . . . 7-27
When to use exceptions. . . . . . . . . . . . 7-27
Declaring exception types . . . . . . . . . . 7-28
Raising and handling exceptions . . . . . . 7-29
Try...except statements . . . . . . . . . . 7-30
Re-raising exceptions . . . . . . . . . . . 7-32
Nested exceptions . . . . . . . . . . . . . 7-33
Try...finally statements . . . . . . . . . . 7-33
Standard exception classes and routines . . 7-34
Chapter 8
Standard routines and I/O 8-1
File input and output . . . . . . . . . . . . . . . . 8-1
Text files . . . . . . . . . . . . . . . . . . . . . 8-3
Untyped files. . . . . . . . . . . . . . . . . . . 8-4
Text file device drivers . . . . . . . . . . . . . . . 8-4
Device functions. . . . . . . . . . . . . . . . . 8-5
The Open function. . . . . . . . . . . . . . 8-5
The InOut function . . . . . . . . . . . . . 8-6
The Flush function. . . . . . . . . . . . . . 8-6
The Close function. . . . . . . . . . . . . . 8-6
Handling null-terminated strings . . . . . . . . . 8-6
Wide-character strings . . . . . . . . . . . . . 8-7
Other standard routines . . . . . . . . . . . . . . 8-8
Part II
Special topics
Chapter 9
Libraries and packages 9-1
Calling dynamically loadable libraries . . . . . . 9-1
Static loading . . . . . . . . . . . . . . . . . 9-2
Dynamic loading. . . . . . . . . . . . . . . 9-2
Writing dynamically loadable libraries. . . . . . 9-4
The exports clause. . . . . . . . . . . . . . . . 9-6
Library initialization code . . . . . . . . . . . 9-7
Global variables in a library . . . . . . . . . . 9-8
Libraries and system variables. . . . . . . . . 9-8