Ver Mensaje Individual
  #4  
Antiguo 01-04-2009
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.110
Reputación: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

A bote pronto, otra posible solución podría ser algo similar a esta:

Código Delphi [-]
type
  TCarregaValoresResult = record
    tipo: string;
    result: boolean;
    equipamiento: string;
  end;

function CarregaValores(ano, num: Integer): TCarregaValoresResult;
var
  tipo, equipamento: String;
begin

  Result.tipo := 'Valor';
  Result.equipamiento := 'Valor';

  Result.result := true;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  carregaValoresResult: TCarregaValoresResult;
begin
  carregaValoresResult := CarregaValores(2009, 2589);

  if carregaValoresResult.result then begin

    ShowMessage(carregaValoresResult.tipo); // Show Valor

    ShowMessage(carregaValoresResult.equipamiento); // Show Valor
  end;

end;
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita