Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #7  
Antiguo 24-08-2010
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Poder: 38
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
No tenés nada que agradecer.

A ver si con esto solucionamos algo...
Código Delphi [-]
type
  RecSearchEvents = record
    sIMEI: string;
    iCompanyId : integer;
    sVehicleId : string;
    iCurrSpeed,iCurrRPM,iAccDeccValue :integer;
    bDIN1, bDIN2, bDIN3, bDIN4 : Boolean;
    fAIN1, fAIN2,  fAIN3, fAIN4 : Extended;
    iGSMSignal, iCurrentProfile : integer;
    fAcelerometerData, fGPSSpeed,  fPowerSuplyVoltage,
    fBatteryVoltage, fBatteryCurrent, fGPSPower, fPCBTemperature,
    fTempSensor1, fTempSensor2, fTempSensor3, fFuelCounter,
    sButtonInput, fCan0, fCan1, fCan2, fCan3, fCan4, fCan5,
    fCan6, fCan7, fCan8,  fCan9 : Extended;
    bGeoZone1, bGeoZone2, bGeoZone3,
    bGeoZone4, bGeoZone5, bGeoZone6, bGeoZone7,
    bGeoZone8, bGeoZone9, bGeoZone10, bGeoZone11,
    bGeoZone12, bGeoZone13, bGeoZone14, bGeoZone15,
    bGeoZone16, bGeoZone17, bGeoZone18, bGeoZone19,
    bGeoZone20 : Boolean;
    fVirtualOdometer : string;
    sCurrOperatorCode : Extended;
    bMovement : Bool
  end;
  TForm1 = class(TForm)
  private
  public
    function SearchEvents(Param: RecSearchEvents): RecSearchEvents;
  end;


var
  Form1: TForm1;

implementation {$R *.dfm}

function TForm1.SearchEvents(Param: RecSearchEvents): RecSearchEvents;
begin
   // Operaciones de la funcion
  Result:= Param;
end;

En este caso pasas y recibis un RecSearchEvents. (o el nombre que quieras darle)
Tenés que cargar los valores en el record antes de llamar a la función por ej:
Código Delphi [-]
var
  rs:RecSearchEvents;
begin
  rs.sIMEI:= '1934102937340';
  rs.iCompanyID:= 11234; 
  ...
  rs:= SearchEvents(rs); // rs, ahora tiene los valores procesados en la función
end;

Nota: No es necesario, pero al ser tantos campos para una mayor claridad quizá te convenga
declarar el registro así:
Código Delphi [-]
  RecSearchEvents = record
    sIMEI: string;
    iCompanyId : integer;
    sVehicleId : string;
    iCurrSpeed, iCurrRPM, iAccDeccValue :integer;
    bDIN: array[1..4] of Boolean;
    bAIN: array[1..4] of Extended;
    iGSMSignal, iCurrentProfile : integer;
    fAcelerometerData, fGPSSpeed,  fPowerSuplyVoltage,
    fBatteryVoltage, fBatteryCurrent, fGPSPower, fPCBTemperature,
    fTempSensor1, fTempSensor2, fTempSensor3, fFuelCounter,
    sButtonInput: Extended;
    fCan: array[0..9] of Extended;
    bGeoZone: array[1..20] of Boolean;
    fVirtualOdometer : string;
    sCurrOperatorCode : Extended;
    bMovement : Bool
  end;

Es mas o ménos lo que buscabas ?

Saludos.

Última edición por ecfisa fecha: 24-08-2010 a las 21:42:37.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Cosulta de BDF no regresa nada eduardo_2009 Tablas planas 3 21-08-2007 15:00:49
??que regresa un query?? david duarte Tablas planas 5 22-05-2006 17:04:53
Funcion SUM me regresa una cadena paty_rlopez Firebird e Interbase 6 18-04-2006 15:13:10
SQLClientDataSet no regresa lo esperado EITB OOP 2 27-09-2004 18:45:25
Como devuelvo un Arreglo en Función Prophoenix Varios 1 30-05-2003 19:40:58


La franja horaria es GMT +2. Ahora son las 07:30:28.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi