Solved

Abort Problem

Posted on 1998-10-19
8
266 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Printing problem 2 102
DBGrid or StringGrid ? 6 105
how to change, disabled button color FMX ? 1 40
Twebbrowser add css to the header 3 29
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

820 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