Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error 124?

Status
Not open for further replies.

AJW

Programmer
Joined
Aug 14, 2001
Messages
3
Location
ZA
Hi, I am using Delphi 5 and I need some help with calling a procedure within another one... because I get [Error] ns.pas(124): Declaration expected but identifier 'write' found Any help with this would be greatly appreciated
procedure TForm1.SortButtonClick(Sender: TObject);
var nums, x : Integer;
begin

x := 1;
While x > 0 Do
X := 0;
For nums := 1 to (MaxNumbers - 1) do
begin if Num[nums] > Num[nums+1]
then begin Swap(Num[nums], Num[nums+1]);
inc(x); end; end; end;
write;
end;
 
procedure TForm1.SortButtonClick(Sender: TObject);
var nums, x : Integer;
begin //1

x := 1;
While x > 0 Do // begin?
X := 0;
For nums := 1 to (MaxNumbers - 1) do
begin //2
if Num[nums] > Num[nums+1]
then begin //3
Swap(Num[nums], Num[nums+1]);
inc(x);
end; //3
end; //2
end; //this end has no begin
write;
end;//1

It looks like you forgot a begin

S. van Els
SAvanEls@cq-link.sr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top