3 newby questions --

John.Han...@Access.Crcn.Net allegedly said:

J>  jeff.teunis...@d2d.dus wrote:

J>  In> That it makes more sense to not include variables that aren't actually
J>  In> used.  Unneeded variables add data to the program, and introduce
J>  In> unnecessary clutter. This can make the program less clear. Exactly what
J>  In> is the upside?
J> Variables which might otherwise be unneeded can add clarity to a program,
J> and in this case add more functionality to the routine, since this is a
J> common routine, but one where the value of the character might be needed
J> at one point, but not at another. Would you rather have two different
J> routines, one that returns the character and one that doesn't? Where is
J> the saving there?

The routine in question DOESN'T return the character, no matter what version
of the compiler is used. Any difference is hidden from the interface. Any loss
of clarity is concerned with the compiler directives, and if you can follow
the directive flow, that is taken care of.

You are correct, I didn't ensure that TP6 didn't have extended syntax.  I
assumed that Borland's _official_ TP6 book would contain correct information.
Needless to say, I was disappointed.  I don't own TP6, as TP7, BP7, and
Virtual Pascal for OS/2 fill my needs quite adequately.  The post you were so
opposed to was intended as a correction of a previous post, which would not
have even compiled under TP7 if extended syntax were not active. In that way,
my procedure is correct.

I chose the

   if KeyPressed then
      while KeyPressed do

to improve clarity, because while it may be redundant, it's more readable to
me. The added code is negligible in any case.

| Disclaimer: The views of this user do not represent those of
|             Dusk To Dawn BBS, DuskNet, or Elvis.
| Email: Jeff.Teunis...@d2d.dusknet.dyn.ml.org
| From Dusk To Dawn BBS, Home of DuskNet -=- d2d.dusknet.dyn.ml.org