Solved

Abort Problem

Posted on 1998-10-19
8
264 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 12

Expert Comment

by:rwilson032697
ID: 1343362
as dwwang says, the code fragment causing the problem would be useful...
0
 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

808 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