Solved

Abort Problem

Posted on 1998-10-19
8
261 Views
Last Modified: 2010-04-06
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
Comment
Question by:MikeWang
8 Comments
 
LVL 4

Expert Comment

by:dwwang
ID: 1343359
Hi, would you please paste you code fragment?
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1343360
hi mikewang,

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

Regards, Zif.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1343361
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
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1343362
as dwwang says, the code fragment causing the problem would be useful...
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 10

Expert Comment

by:viktornet
ID: 1343363
Yup B-)

Vik
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1343364
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
 
LVL 10

Accepted Solution

by:
Lischke earned 100 total points
ID: 1343365
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
 

Author Comment

by:MikeWang
ID: 1343366
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now