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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3c99788a4ac63037 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Pageless Text_IO Date: 1999/11/17 Message-ID: <80vdhr$kbf$1@nnrp1.deja.com>#1/1 X-Deja-AN: 549868111 References: <80qarp$9qe1@news.cis.okstate.edu> <80qo6v$926$1@nnrp1.deja.com> <80qqae$8a22@news.cis.okstate.edu> <80s3fj$8c6$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x24.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Nov 17 23:25:51 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-11-17T00:00:00+00:00 List-Id: In article , 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.