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ə50/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   46   47   48   49   50   51   52   53   ...   294
DelphiLanguageGuide

Simple Statements
A simple statement doesn't contain any other statements. Simple statements include assignments, calls to
procedures and functions, and goto jumps.
Assignment Statements
An assignment statement has the form
variable := expression
where variable is any variable reference, including a variable, variable typecast, dereferenced pointer, or component
of a structured variable. The expression is any assignment-compatible expression (within a function block, variable
can be replaced with the name of the function being defined. See Procedures and functions). The := symbol is
sometimes called the assignment operator.
31


An assignment statement replaces the current value of variable with the value of expression. For example,
I := 3;
assigns the value 3 to the variable 
I
. The variable reference on the left side of the assignment can appear in the
expression on the right. For example,
I := I + 1;
increments the value of 
I
. Other assignment statements include
X := Y + Z;
Done := (I >= 1) and (I < 100);
Hue1 := [Blue, Succ(C)];
I := Sqr(J) - I  * K;
Shortint(MyChar) := 122;
TByteRec(W).Hi := 0;
MyString[I] := 'A';
SomeArray[I + 1] := P^;
TMyObject.SomeProperty := True;

Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   46   47   48   49   50   51   52   53   ...   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