comp.lang.ada
 help / color / mirror / Atom feed
From: mabzug1@umbc.edu (Mordechai T. Abzug)
Subject: Continue/next statement, static variables, and block comments
Date: 1996/07/21
Date: 1996-07-21T00:00:00+00:00	[thread overview]
Message-ID: <4ssspn$501@umbc10.umbc.edu> (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.




             reply	other threads:[~1996-07-21  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-21  0:00 Mordechai T. Abzug [this message]
1996-07-21  0:00 ` Continue/next statement, static variables, and block comments 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
replies disabled

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