Fórum Function retornando mais de um Result #229508
03/05/2004
0
Alguém sabe como fazê-lo?
Kenji_rh
Curtir tópico
+ 0Posts
03/05/2004
Beppe
Gostei + 0
03/05/2004
Motta
type Tmeutipo = record
numero integer;
letra string;
end;
a funtion retorn este tipo
function minhafunction : Tmeutipo;
function .....minhafunction : Tmeutipo;
begin
Result.numero := 1;
Result.letra := ´a´;
end;
Gostei + 0
03/05/2004
Tinorj
:!:
function TForm1.RetornaArray: Variant; var VarLocal: Array of Variant; Tam: Integer; begin Tam := Length(VarLocal); SetLength(VarLocal, Tam + 1); VarLocal[Tam] := 1; Tam := Length(VarLocal); SetLength(VarLocal, Tam + 1); VarLocal[Tam] := ´Nome´; Tam := Length(VarLocal); SetLength(VarLocal, Tam + 1); VarLocal[Tam] := now; Result := VarLocal; end; procedure TForm1.Button1Click(Sender: TObject); var teste: Array of Variant; begin teste := RetornaArray; ShowMessage(IntToStr(teste[0]) + teste[1] + DateToStr(teste[3])); end;
[]´s
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)