Delphi Language Guide Delphi for Microsoft Win32 Delphi for the Microsoft. Net framework



Yüklə 0,84 Mb.
Pdf görüntüsü
səhifə45/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   41   42   43   44   45   46   47   48   ...   294
DelphiLanguageGuide

Reserved Words
The following reserved words cannot be redefined or used as identifiers.
Reserved Words
and
else
inherited
packed
then
array
end
initialization procedure
threadvar
as
except
inline
program
to
asm
exports
interface
property
try
begin
file
is
raise
type
case
final
label
record
unit
class
finalization
library
repeat
unsafe
const
finally
mod
resourcestring until
constructor
for
nil
sealed
uses
destructor
function
not
set
var
dispinterface goto
object
shl
while
div
if
of
shr
with
do
implementation or
static
xor
downto
in
out
string
In addition to the words above, private, protected, public, published, and automated act as reserved words within
class type declarations, but are otherwise treated as directives. The words at and on also have special meanings,
and should be treated as reserved words.
27


Directives
Directives are words that are sensitive in specific locations within source code. Directives have special meanings in
the Delphi language, but, unlike reserved words, appear only in contexts where user-defined identifiers cannot occur.
Hence -- although it is inadvisable to do so -- you can define an identifier that looks exactly like a directive.
Directives
absolute
dynamic
local
platform
requires
abstract
export
message private
resident
assembler external
name
protected
safecall
automated far
near
public
stdcall
cdecl
forward
nodefault published
stored
contains
implements overload read
varargs
default
index
override
readonly
virtual
deprecated inline
package register
write
dispid
library
pascal
reintroduce writeonly
Numerals
Integer and real constants can be represented in decimal notation as sequences of digits without commas or spaces,
and prefixed with the + or - operator to indicate sign. Values default to positive (so that, for example, 67258 is
equivalent to +67258) and must be within the range of the largest predefined real or integer type.
Numerals with decimal points or exponents denote reals, while other numerals denote integers. When the character
E or e occurs within a real, it means "times ten to the power of". For example, 7E2 means 7 * 10^2, and 12.25e+6
and 12.25e6 both mean 12.25 * 10^6.
The dollar-sign prefix indicates a hexadecimal numeral, for example, $8F. Hexadecimal numbers without a preced
ing - unary operator are taken to be positive values. During an assignment, if a hexadecimal value lies outside the
range of the receiving type an error is raised, except in the case of the Integer (32-bit integer) where a warning is
raised. In this case, values exceeding the positive range for Integer are taken to be negative numbers in a manner
consistent with 2's complement integer representation.
For more information about real and integer types, see Data Types, Variables, and Constants. For information about
the data types of numerals, see True constants.
Labels
A label is a standard Delphi language identifier with the exception that, unlike other identifiers, labels can start with
a digit. Numeric labels can include no more than ten digits - that is, a numeral between 0 and 9999999999.
Labels are used in goto statements. For more information about goto statements and labels, see Goto statements.

Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   41   42   43   44   45   46   47   48   ...   294




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin