comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Pageless Text_IO
Date: 1999/11/17
Date: 1999-11-17T00:00:00+00:00	[thread overview]
Message-ID: <80vdhr$kbf$1@nnrp1.deja.com> (raw)
In-Reply-To: ev_remove_this_ans-1611991644460001@192.168.1.254

In article <ev_remove_this_ans-1611991644460001@192.168.1.254>,
  ev_remove_this_ans@evans.pgh.pa.us (Arthur Evans Jr) wrote:
> In article <80s3fj$8c6$1@nnrp1.deja.com>, Robert Dewar
>
> What a curious statement!  VT may indeed signify end of a
> source line in some particular Ada implementation (GNAT?), but
> it surely does not in general.  As Robert himself has
> repeatedly pointed out in this forum, the standard is silent
> on how to represent an Ada source program in a computer.
>
> Art Evans

Well the point is (and I suspect from the above that maybe Art
doesn't know this, many people don't :-) VT is a REQUIRED
format effector in the source input. Every compiler must have
a representation for VT, and must treat it as end of line.

Now in language lawyer mode, Art is right, the standard does
not say that VT must be represented as the ASCII character VT,
but in practice all ASCII-based Ada compilers will use VT to
represent VT, what other possible choice is there (the
ACAATS/ACVC tests also use VT as the representation of VT in the
distributed tests).

Note that it is also the case that you can represent the
character A using ASCII 'B' and the character B using ASCII
'A'. That would be perverse but valid. In my view it would be
equally perverse to represent VT with other than ASCII VT.

So what I said is true in practice, if you are writing an Ada
compiler where you make the absolutely standard choice of
representing VT as Ascii.VT, then if you use Text_IO, you will
find its notion of line numbers does not match that of the RM.

By the way, the allowance of VT in text is truly a horrible
anacronism. In some early days VT did a partial form skip so
you could use it for vertical tabulation (hence the name), but
no such printers have been made for a long time (though many
modern electronic printers simulate the old carriage tapes,
including VT :-)

You can do some horrible things with VT, since usually printers
ignore it, as do terminal displays, so you can have a line
of code with what looks like an embedded comment:

   procedure (X : Integer -- always positive --; y : Float);

How does this work? By having a VT here        ^

YECH :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~1999-11-17  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-16  0:00 Pageless Text_IO David Starner
1999-11-16  0:00 ` Robert Dewar
1999-11-16  0:00   ` Robert Dewar
1999-11-16  0:00     ` John Herro
1999-11-17  0:00       ` Robert Dewar
1999-11-17  0:00     ` Wes Groleau
1999-11-19  0:00       ` Robert Dewar
1999-11-24  0:00         ` Wes Groleau
1999-11-25  0:00           ` Robert Dewar
1999-11-16  0:00 ` Robert Dewar
1999-11-16  0:00   ` David Starner
1999-11-16  0:00     ` Robert Dewar
1999-11-16  0:00       ` Arthur Evans Jr
1999-11-17  0:00         ` Robert Dewar [this message]
1999-11-16  0:00 ` Robert Dewar
1999-11-16  0:00 ` DuckE
1999-11-17  0:00   ` Robert Dewar
1999-11-17  0:00   ` Wes Groleau
replies disabled

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