exit(0) in Delphi?

Get help on programming - C++, Java, Delphi, etc.
Post Reply
UndaGrad
Registered User
Posts: 228
Joined: 28 Apr 2005, 02:00
Location: JHB

exit(0) in Delphi?

Post by UndaGrad »

I want to jup out of a FOR loop once a certain condition is met. I've tried reassigning the loop control condition's value to one that stops the loop, but Delphi complains that I'm, '... trying to change a FORLOOP control...'.

So is there such a thing as a exit(0)?
Moses
Registered User
Posts: 2545
Joined: 21 Jul 2004, 02:00
Location: Location:
Contact:

Post by Moses »

Ever heard of a while loop?
UndaGrad
Registered User
Posts: 228
Joined: 28 Apr 2005, 02:00
Location: JHB

Post by UndaGrad »

//never mind
PHR33K
Registered User
Posts: 779
Joined: 05 Sep 2004, 02:00
Contact:

Post by PHR33K »

or repeat... untill


like:

(just quickly done)

procedure whatever;
var
i : integer;
begin

i := 0;

repeat
begin
//statement here
inc(i);
until i = 10;

end;

end;
end.
Post Reply