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 X-Google-Attributes: gid103376,public From: mfeldman@seas.gwu.edu (Michael Feldman) Subject: Re: Continue/next statement, static variables, and block comments Date: 1996/07/21 Message-ID: <4stelo$htd@felix.seas.gwu.edu>#1/1 X-Deja-AN: 169232368 references: <4ssspn$501@umbc10.umbc.edu> organization: George Washington University newsgroups: comp.lang.ada Date: 1996-07-21T00:00:00+00:00 List-Id: In article <4ssspn$501@umbc10.umbc.edu>, Mordechai T. Abzug wrote: >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. It's perfectly natural to encapsulate state information in an enclosing unit of some kind. Indeed, it's how OO languages do it. You have a problem only because you're thinking in terms of isolated functions instead of encapsulsated sets of functions operating on variables (objects, whatever). > >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. . How about something revolutionary: an editor that lets you insert -- at the begining of a range of lines. :-) BTW - suppose you have a 24-line editor window and then use C-or Pascal- style commenting to "comment out" a 50-line block of code? Then you scroll the middle 24 lines into your window. How do you know whether it's active code, or commented out? _That's_ the real virtue of line commenting! Mike Feldman