Real Types

A real type defines a set of numbers that can be represented with floating-point notation. The table below gives the ranges and storage formats for the fundamental real types on the Win32 platform. Double -5.0 x 10A324 1.7 x 10A308 1516 8 Double -5.0 x 10A324 1.7 x 10A308 1516 8 Currency -922337203685477.5808 922337203685477.5807 1920 8 Currency -922337203685477.5808 922337203685477.5807 1920 8 The following table shows how the fundamental real types map to .NET framework types. Fundamental...

Control Loops

Loops allow you to execute a sequence of statements repeatedly, using a control condition or variable to determine when the execution stops. Delphi has three kinds of control loop repeat statements, while statements, and for statements. You can use the standard Break and Continue procedures to control the flow of a repeat, while, or for statement. Break terminates the statement in which it occurs, while Continue begins executing the next iteration of the sequence. The syntax of a repeat...

Instruction Opcodes

The built-in assembler supports all of the Intel-documented opcodes for general application use. Note that operating system privileged instructions may not be supported. Specifically, the following families of instructions are supported Pentium family Pentium Pro and Pentium II Pentium III Pentium 4 In addition, the built-in assembler supports the following instruction sets AMD 3DNow (from the AMD K6 onwards) AMD Enhanced 3DNow (from the AMD Athlon onwards) For a complete description of each...

Text File Device Drivers

You can define your own text file device drivers for your programs. A text file device driver is a set of four functions that completely implement an interface between Delphi's file system and some device. The four functions that define each device driver are Open, InOut, Flush, and Close. The function header of each function is function DeviceFunc(var F TTextRec) Integer where DeviceFunc is the name of the function (that is, Open, InOut, Flush, or Close). The return value of a deviceinterface...

Using the inline Directive

The Delphi compiler allows functions and procedures to be tagged with the inline directive to improve performance. If the function or procedure meets certain criteria, the compiler will insert code directly, rather than generating a call. Inlining is a performance optimization that can result in faster code, but at the expense of space. Inlining always causes the compiler to produce a larger binary file. The inline directive is used in function and procedure declarations and definitions, like...

Automation Object Method Call Syntax

The syntax of an Automation object method call or property access is similar to that of a normal method call or property access. Automation method calls, however, can use both positional and named parameters. But some Automation servers do not support named parameters. A positional parameter is simply an expression. A named parameter consists of a parameter identifier, followed by the symbol, followed by an expression. Positional parameters must precede any named parameters in a method call....

Open Array Constructors

Open array constructors allow you to construct arrays directly within function and procedure calls. They can be passed only as open array parameters or variant open array parameters. An open array constructor, like a set constructor, is a sequence of expressions separated by commas and enclosed in brackets. you could call the Add procedure with the statement Open array constructors can be passed only as value or const parameters. The expressions in a constructor must be assignment-compatible...

Forward Declarations and Mutually Dependent Classes

If the declaration of a class type ends with the word class and a semicolon - that is, if it has the form type className class with no ancestor or class members listed after the word class, then it is a forward declaration. A forward declaration must be resolved by a defining declaration of the same class within the same type declaration section. In other words, between a forward declaration and its defining declaration, nothing can occur except other type declarations. Forward declarations...

Special Symbols

Special symbols are non-alphanumeric characters, or pairs of such characters, that have fixed meanings. The following single characters are special symbols amp ' , - . lt gt The following character pairs are also special symbols . . lt gt lt gt The following table shows equivalent symbols The left bracket is equivalent to the character pair of left parenthesis and period . The right bracket is equivalent to the character pair of period and right parenthesis . The left brace is equivalent to the...

Compiling Packages

Packages are ordinarily compiled from the IDE using .dpk files generated by the Project Manager. You can also compile .dpk files directly from the command line. When you build a project that contains a package, the package is implicitly recompiled, if necessary. The following table lists the files produced by the successful compilation of a package. Compiled package files File extension Contents DCP Win32 or DCPIL .NET A binary image containing a package header and the concatenation of all .dcu...