comp.lang.ada
 help / color / mirror / Atom feed
From: evans@evans.pgh.pa.us (Arthur Evans Jr)
Subject: Text_IO and Ada source (was: Form feed comment for pragma Page)
Date: 1996/06/06
Date: 1996-06-06T00:00:00+00:00	[thread overview]
Message-ID: <evans-0606960931350001@ppp7.pgh.net> (raw)
In-Reply-To: dewar.833946907@schonberg


I said (among other things)

> The RM in A.10(8) is quite clear that the standard does not specify
> which characters, if any, correspond to logical end-of-line or
> end-of-page or end-of-file.

Robert Dewar (and Keith Thompson) replied

> Art, you are confused, we are talking about source representation here.
> YOu quoted some irrelevant paragraph about Text_IO. THe operable
> statement in the standard is: 2.1(13)

Absolutely right -- I missed that section.

Robert goes on:

> It is very important to understand that source representation has
> nothing to do with type Standard.Character or with Text_IO. Sure, may
> implementations may choose to represent the source in a manner that is
> consistent with Text_IO as a sequence of elements of type
> Standard.Character, but this is not a required representation, just
> one possible choice.

It's too bad in a way, though I guess inevitable, that the standards for
Text_IO and source representation are not better connected.  An effect
is that it's not clear how to write an Ada program that emits proper Ada
code -- proper in the sense that the compiler I am using will be able to
read it.  Indeed, the documentation of the Ada compiler I now use is
silent on both of these subjects:
  - the exact form required for source text; and
  - how Text_IO treats end-of-line and such.

Appendix M(6) requires that the form of source text be documented,
though I see no requirement to document the details of Text_IO file
format.  (Curious omission...)

In practice, of course, all of this is a non-issue, since in my compiler
(and I expect in most compilers) both forms use the conventions for text
files on the platform.  It could be very much an issue if my program
needed to write Ada code to be compiled on some other platform.

Art




  reply	other threads:[~1996-06-06  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-04  0:00 Form feed comment for pragma Page Rex Reges
1996-06-03  0:00 ` Robert Dewar
1996-06-06  0:00   ` Rex Reges
1996-06-05  0:00     ` Robert Dewar
1996-06-12  0:00       ` Rex Reges
1996-06-12  0:00         ` Rex Reges
1996-06-12  0:00           ` Robert Dewar
1996-06-13  0:00           ` Ken Garlington
1996-06-03  0:00 ` Robert Dewar
1996-06-04  0:00   ` Robert A Duff
1996-06-04  0:00     ` Robert Dewar
1996-06-04  0:00   ` Arthur Evans Jr
1996-06-04  0:00     ` Robert Dewar
1996-06-06  0:00       ` Arthur Evans Jr [this message]
1996-06-06  0:00         ` Text_IO and Ada source (was: Form feed comment for pragma Page) Robert Dewar
1996-06-11  0:00           ` Norman H. Cohen
1996-06-12  0:00             ` Robert Dewar
1996-06-18  0:00           ` Norman H. Cohen
1996-06-20  0:00             ` Robert Dewar
1996-06-05  0:00     ` Form feed comment for pragma Page Keith Thompson
replies disabled

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