对于数组
for
循环遍历数组中的项
program ArrayLoop;
{$APPTYPE CONSOLE}
const a : array[1..3] of real = ( 1.1, 2.2, 3.3 );
var f : real;
begin
for f in a do
WriteLn( f );
end.
输出:
1,1
2,2
3,3
for
循环遍历数组中的项
program ArrayLoop;
{$APPTYPE CONSOLE}
const a : array[1..3] of real = ( 1.1, 2.2, 3.3 );
var f : real;
begin
for f in a do
WriteLn( f );
end.
输出:
1,1
2,2
3,3