From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: Continue/next statement, static variables, and block comments
Date: 1996/07/21
Date: 1996-07-21T00:00:00+00:00 [thread overview]
Message-ID: <4stelo$htd@felix.seas.gwu.edu> (raw)
In-Reply-To: 4ssspn$501@umbc10.umbc.edu
In article <4ssspn$501@umbc10.umbc.edu>,
Mordechai T. Abzug <mabzug1@umbc.edu> 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. <sigh>.
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
next prev parent 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 Continue/next statement, static variables, and block comments Mordechai T. Abzug
1996-07-21 0:00 ` Michael Feldman [this message]
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