Do you have BDE in your uses clause? This used to cause this.
Try using "SysUtils.Abort" instead (or perhaps putting BDE before SysUtils
in the uses clause, but I haven't tried this).

> -----Original Message-----
> From: Patrick Dunford [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, June 15, 2000 1:56 PM
> To:   Multiple recipients of list delphi
> Subject:      [DUG]:  Strange compiler error
> 
> The following code returns a compiler error.
> 
> procedure TLibData.BookTableBeforeDelete(DataSet: TDataSet);
> var DoDelete : Word;
> begin
>       MessageBeep(MB_ICONQUESTION);
>       DoDelete := MessageDlg('Are you sure you want to delete this
> book?',mtConfirmation,
>       [mbYes,mbNo],0);
>    if (DoDelete = mrNo) then Abort;
> end;
> 
> The message is on the line containing the Abort procedure call and reads
> 
> Statement expected, but expression of type 'Integer' found
> 
> The compiler was expecting to find a statement, but instead it found an
> expression of the specified type.
> 
> 
> remove "Abort" and the message disappears.
> The Abort procedure is properly linked in from SysUtils, I can see no
> reason
> why it would be taken to be an expression of type Integer. There are no
> redeclarations of Abort anywhere in the application. Using D3.02
> 
> 
> ============================================
> Patrick Dunford, Christchurch, NZ
> EnzedRailWeb Sites
> http://patrick.dunford.com/enzedrailweb/
> 
> --------------------------------------------------------------------------
> -
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to