for...to, for...downto (reserved words)
The for statement causes theafter do to be executed once for each value in the range first to last.
for var := first to last do
for var := first downto last do
The controland the initial and final values must be of an type.
With to, the value of the control variable is incremented by 1 for each loop.
With downto, the value of the control variable is decremented by 1 for each loop.
(* for ... to, for ... downto *)
for I := 1 to ParamCount do
for I := 1 to 10 do
for J := 1 to 10 do
X := 0;
for K := 1 to 10 do
X := X + Mat1[I, K] * Mat2[K, J];
Mat[I, J] := X;