comp.lang.ada
 help / color / mirror / Atom feed
From: 944166@edna.cc.swin.edu.au (Jimmy Fang)
Subject: Re: Easy ADA question from a hapless Newbie
Date: 26 Oct 1994 03:09:36 GMT
Date: 1994-10-26T03:09:36+00:00	[thread overview]
Message-ID: <38kh9gINNm67@edna.cc.swin.edu.au> (raw)
In-Reply-To: 38jl8h$rqb@columbia.acc.brad.ac.uk

AJ JONES (A.J.Jones@bradford.ac.uk) wrote:

: Can anyone help me ? Im new to ADA, used to PASCAL.  Is there a way of
: ending a loop such as a while loop, etc, by jumping to the end of that
: loop.  There used to be a command in Pascal that would let you do this.
: I think it was something like stop. I know that halt stopped the entire
: program.

Try the "exit" statement.

loop
  sequence of statements 1;
     exit when <boolean condition>
  sequence of statements 2;
end loop;

The exit statment will cause the program execution to continue
at the next statement outside of the loop.  The second block of
statements will not be executed once the boolean condition is
met.


- Jim
---------------------------------------------------------------------
Undergradual Student	Swinburne University of Technology 
			Melbourne, Australia




      parent reply	other threads:[~1994-10-26  3:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-25 19:11 Easy ADA question from a hapless Newbie AJ JONES
1994-10-25 21:07 ` Ken Anderson
1994-10-25 22:17 ` mcriley on BIX
1994-10-26  3:09 ` Jimmy Fang [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox