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;
Dostları ilə paylaş: