Loop "FOR" para acessar valores de arrays.
26/02/2010
0
Maria Fernanda
Posts
27/02/2010
Mazin
i, x: Integer;
...
for i:= 0 to 5 do
begin
x := vCabecalho[ArrValores[i*2], ArrValores[(i*2)+1]];
writeln(x);
end;
27/02/2010
Mazin
i, x: Integer;
...
for i:= 0 to 5 do
begin
x := vCabecalho[ArrValores[i*2], ArrValores[(i*2)+1]];
writeln(x);
end;
27/02/2010
Perivaldo Martins
var
vValores: array[1..6, 2..7] of Integer;
vCabecalho: array[0..6] of Integer;
i, x: Integer;
begin
vCabecalho[0]:= 1;
vCabecalho[1]:= 2;
vCabecalho[2]:= 3;
vCabecalho[3]:= 4;
vCabecalho[4]:= 5;
vCabecalho[5]:= 6;
vCabecalho[6]:= 7;
//
vValores[1,2] := 10;
vValores[2,3] := 20;
vValores[3,4] := 30;
vValores[4,5] := 40;
vValores[5,6] := 50;
vValores[6,7] := 60;
//
for i:= 0 to 5 do
begin
x := vValores[vCabecalho[i], vCabecalho[(i)+1]];
Memo1.Lines.Add(IntToStr(x));
end;
end; Boa sorte e bons códigos!!
Clique aqui para fazer login e interagir na Comunidade :)