comp.lang.ada
 help / color / mirror / Atom feed
* Continue/next statement, static variables, and block comments
@ 1996-07-21  0:00 Mordechai T. Abzug
  1996-07-21  0:00 ` Michael Feldman
  1996-07-22  0:00 ` Kevin J. Weise
  0 siblings, 2 replies; 6+ messages in thread
From: Mordechai T. Abzug @ 1996-07-21  0:00 UTC (permalink / raw)



Many languages provide a means to bypass the current iteration of a loop
without terminating the loops, ie. C's continue or Perl's next.  Ada
doesn't seem to have one, despite having an exit statement, which is
extremely similar in nature to the continue.  Is there something I'm
missing?  I could, of course, model "continue" using if's, but a genuine
continue or next is more natural, reads better, and works better in case
statements.  Anyone know of a suitable substitute?

Another problem is static variables, ie. variables which are only visible
inside a function but retain their value across multiple invocations of the
funcyion.  Again, I can model this (putting the function and the variable
in their own dummy package), but don't know a way to do it naturally.

One last question (well, this one's more in the way of a gripe, since I'm
fairly certain I'm not missing anythhing here): no block commenting.  Line
comments are a superior way of commenting when documentation is the only
thing you have in mind, but if you want to comment out a large section of
code, you want block comments.  My makeshift here is an "if false
then. . . endif;" pair, but of course, it only works for executable
statements, not declarations.   <sigh>.

So, anyone have any constructive suggestions?  Please don't tell me I
should just do this in C -- for various reasons, Ada makes sense for the
project as a whole.  I just have a few problems with it. 

-- 
			  Mordechai T. Abzug
http://umbc.edu/~mabzug1   mabzug1@umbc.edu     finger -l mabzug1@gl.umbc.edu
In God we trust.  All others pay cash.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1996-07-24  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-21  0:00 Continue/next statement, static variables, and block comments Mordechai T. Abzug
1996-07-21  0:00 ` Michael Feldman
1996-07-22  0:00 ` Kevin J. Weise
1996-07-23  0:00   ` Kevin J. Weise
1996-07-23  0:00     ` Robert A Duff
1996-07-24  0:00       ` Dale Stanbrough

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