Board index » delphi » "BDE" in Uses clause producing problems

"BDE" in Uses clause producing problems

Hi,

Using Win98SE; D4 C/S;

I've just added the "BDE" unit to my Uses clause (so that I can trap key
violations); now, code that previously compiled OK is producing errors.  EG,

  wwTable50EndTime.Value := Time;

produces the following error:

"[Error] Patient.pas(1206): '(' expected but ';' found "

In addition, the Abort command produces the following strange error:

"[Error] PatData.pas(1726): Statement expected, but expression of type
'Integer' found"

Can anyone tell me what's going on here, and how to get around it?

(If I take "BDE" out of the Uses clause, everything compiles OK again --
except, of course, my key violation-trapping code at the end of the .pas
file.)

TIA, Peter Hiller

 

Re:"BDE" in Uses clause producing problems


Peter,

You've run into a couple of name clashes.  The BDE unit defines Time
as a type, and Abort as a constant (look at the BDE.INT file in the
Delphi\Doc directory).  This conflicts with the definitions of Time
and Abort as found in the SysUtils.PAS unit.

To fix your code, you can keep BDE in your uses clause, and change
the errant lines to explicity use the SysUtils Time and Abort
routines:

  wwTable50EndTime.Value := SysUtils.Time;
and

  SysUtils.Abort;

HTH,

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/

Re:"BDE" in Uses clause producing problems


Chris -

Thanks heaps, problems solved!

Peter
"Chris R. Timmons" <crtimmons@X_NOSPAM_Xcrtimmonsinc.com> wrote in message
news:Xns913A308C22AEcrtimmonscrtimmonsin@207.105.83.65...

Quote
> Peter,

> You've run into a couple of name clashes.  The BDE unit defines Time
> as a type, and Abort as a constant (look at the BDE.INT file in the
> Delphi\Doc directory).  This conflicts with the definitions of Time
> and Abort as found in the SysUtils.PAS unit.

> To fix your code, you can keep BDE in your uses clause, and change
> the errant lines to explicity use the SysUtils Time and Abort
> routines:

>   wwTable50EndTime.Value := SysUtils.Time;

> and

>   SysUtils.Abort;

> HTH,

> Chris.
> -------------
> C.R. Timmons Consulting, Inc.
> http://www.crtimmonsinc.com/

Other Threads