Try Sysutils.abort to be sure which one the compiler is using

To:                     Multiple recipients of list delphi <[EMAIL PROTECTED]>
Send reply to:          [EMAIL PROTECTED]
From:                   "Patrick Dunford" <[EMAIL PROTECTED]>
Subject:                [DUG]:  Strange compiler error
Date sent:              Thu, 15 Jun 2000 13:55:36 +1200

> 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



Rohit

======================================================================
CFL - Computer Fanatics Ltd.  21 Barry's Point Road, AKL, New Zealand
PH    (649) 489-2280 
FX    (649) 489-2290
email [EMAIL PROTECTED]  or  [EMAIL PROTECTED]
======================================================================

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to