From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6cba88feacd3c2c5,start X-Google-Attributes: gid103376,public From: mabzug1@umbc.edu (Mordechai T. Abzug) Subject: Continue/next statement, static variables, and block comments Date: 1996/07/21 Message-ID: <4ssspn$501@umbc10.umbc.edu>#1/1 X-Deja-AN: 169186930 organization: University of Maryland, Baltimore County nntp-posting-user: mabzug1 newsgroups: comp.lang.ada Date: 1996-07-21T00:00:00+00:00 List-Id: 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. . 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.