• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

Abort Problem

I have tried useing the BDE declared in my uses section, but why it cause the Abort procedure could not be compile. The
error message is : Statement expected, but expression of
type 'Integer' found. (Delphi 3)
0
MikeWang
Asked:
MikeWang
1 Solution
 
dwwangCommented:
Hi, would you please paste you code fragment?
0
 
ZifNabCommented:
hi mikewang,

Are you sure you haven't forgotten to write a simple ';'?

Regards, Zif.
0
 
viktornetCommented:
Hello MikeWang ....

As those guys underlined there is nothing wrong w/ the BDE declaration. You've forgotten to place a "(" or a ";" w/o the quotes... Or something similar to these..

Cheers,
Viktor
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
rwilson032697Commented:
as dwwang says, the code fragment causing the problem would be useful...
0
 
viktornetCommented:
Yup B-)

Vik
0
 
BoRiSCommented:
MikeWang

Yip a code sample would be great, also check this it's the most common problem with this error message...make sure you have all the end; in E.G.

begin
 code.here.....
  if code.here then begin
   some more code...
  end;//make sure you add the end to this statement
end;

Later
BoRiS

0
 
LischkeCommented:
Hi MikeWang,

I believe the compiler error comes from a double declaration of Abort. You have to write SysUtils.Abort; instead of just Abort;

That's all.

Ciao, Mike
0
 
MikeWangAuthor Commented:
Because my Program uses the DBISaveChanges function, so I add
the BDE declared in the uses section, but found it cause
the Abort procedure could not be compile (if a unit not include Abort procedure, the unit could be compile).
The following is a test Program.

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Bde;
type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
  if Edit1.Text = 'aa' then Abort;
  Color := clGreen;
end;

end.


Regards,
MikeWang



0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now