Re: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-14 Thread Stephano
KES wrote: library tkes2; {$mode objfpc} {$PACKRECORDS C} function somefn: integer; cdecl; export; begin somefn:= 3; end; exports //I do not do as: // somefn name 'somefn'; // because of this cause error tkes2(17,1) Error: Asm: Duplicate label somefn //so I do as: somefn name

Re: [fpc-pascal] How do I add a TComponent to TPanel dynamically?

2008-08-26 Thread Stephano
Danie wrote: Constructor TControlVolume.Create( Sender:TComponent ); begin Inherited Create(Sender); fCVShape.Create( Sender ); end; Destructor TControlVolume.Destroy; begin fCVShape.Destroy; Inherited Destroy ; end; fCVShape.Create(Sender) - fCVShape :=

Re: [fpc-pascal] Serial Unit for Windows

2008-07-19 Thread Stephano
Michael Van Canneyt wrote: I looked at the unit the first time you posted it, but there is little I can do: I don't do serial programming. I think it is best if you contact someone who does serial programming directly, and ask them to test this unit. Michael. I will acquire some serial

Re: [fpc-pascal] Serial Unit for Windows

2008-07-19 Thread Stephano
Zaher Dirkey wrote: bm_DCB_fRtsControl = $3000. It should be $2000. bm_DCB_fDtrControl = $30. It should be $20. DtrControl and RtsControl have double bits so it should be as mask in same struct.inc you can see function fDtrControl(var a : DCB) : DWORD; begin

Re: [fpc-pascal] Serial unit for Linux and Windows

2008-04-12 Thread Stephano
Tomas Hajny wrote: Do I understand correctly that you cannot find it? As I wrote above, this constant is defined in unit System, i.e. always available without any additions to the uses clause or so. I was just too lazy to launch Lazarus/FPC and look for it when I replied. As you mention, it is

Re: [fpc-pascal] Serial unit for Linux and Windows

2008-04-11 Thread Stephano
Tomas Hajny wrote: If I read the Windows unit sources correctly, INVALID_HANDLE_VALUE = -1 too. However, I believe that you might consider returning UnusedHandle constant defined in System unit for all the platforms (that's -1 for at least most of them anyway, but I believe that it may be still

Re: [fpc-pascal] Serial unit for Linux and Windows

2008-04-11 Thread Stephano
Marco van de Voort wrote: No, they are correct. If you look into the headers you'll see: DWORD DCBlength; /* sizeof(DCB) */ DWORD BaudRate; /* Baudrate at which running */ DWORD fBinary: 1; /* Binary Mode (skip EOF check)*/ DWORD

Re: [fpc-pascal] Serial unit for Linux and Windows

2008-04-11 Thread Stephano
Koenraad Lelong wrote: 5- Is it OK to designate serial ports by COMx fow Windows and /dev/ttySx for Linux? FWIW, I have a USB to serial converter. It shows as /dev/ttyUSB0. I see now how I did not express myself clearly: I meant that I did not intend to change the way devices are specified.

[fpc-pascal] Serial unit for Linux and Windows

2008-04-09 Thread Stephano
to designate serial ports by COMx fow Windows and /dev/ttySx for Linux? 6- Is it OK for TSerialState to include DCB for Windows and tios for Linux? My guess for questions 5 and 6 is yes. Any input is appreciated. Stephano ___ fpc-pascal maillist

Re: [fpc-pascal] Firebird UDF

2008-03-15 Thread Stephano
nothing todo... ok restart: library pudf; {$mode objfpc}{$H+} uses Classes, p_func in 'p_func.pas'; exports pround name 'p_round'; {$R pudf.res} begin // DECLARE EXTERNAL FUNCTION pround // DOUBLE PRECISION, INTEGER // RETURNS DOUBLE PRECISION BY VALUE // ENTRY_POINT

Re: [fpc-pascal] Firebird UDF

2008-03-13 Thread Stephano
Codebue Fabio - P-Soft wrote: This is my UDF source library pudf; {$mode objfpc}{$H+} uses Classes; function pround(var valore: real; ndec: integer):real;export; var i: integer; risultato: real; ndivisore: integer; begin risultato:= valore; ndivisore:= 1; for i:= 1

Re: [fpc-pascal] Firebird UDF

2008-03-13 Thread Stephano
Codebue Fabio - P-Soft wrote: nothing todo... ok restart: library pudf; {$mode objfpc}{$H+} uses Classes, p_func in 'p_func.pas'; exports pround name 'p_round'; {$R pudf.res} begin // DECLARE EXTERNAL FUNCTION pround // DOUBLE PRECISION, INTEGER // RETURNS DOUBLE PRECISION BY

Re: [fpc-pascal] serial ports under Unix using Freepascal

2007-10-05 Thread Stephano
The Linux serial unit was ported to windows. Refer to http://www.mail-archive.com/[EMAIL PROTECTED]/msg15194.html - Original Message - From: [EMAIL PROTECTED] To: fpc-pascal@lists.freepascal.org Sent: Wednesday, October 03, 2007 10:53 PM Subject: [fpc-pascal] serial ports

[fpc-pascal] sqldb query error on group by with where clause

2007-09-15 Thread Stephano
select k_province, k_city, k_school, count(file_id), sum(amt_student) from upload_log where (date(upload_time)='2007-09-14') group by k_province, k_city having k_province='205' and k_city='205031'; raises exception...Add k_school to the group by clause.Stephano