[comp.lang.ada] END_OF_* Ambiguity?

simpson@spp3.UUCP (Scott Simpson) (06/18/88)

There seems to be some ambiguity in the LRM in reference to
END_OF_PAGE and END_OF_FILE.  I am using TEXT_IO and I have some code
that looks like

    while not END_OF_FILE and then (END_OF_PAGE or END_OF_LINE) loop

which I assume can be condensed into

    while not END_OF_FILE and then END_OF_LINE loop

since if you have an end of page, you have an end of line.  Now, to
quote from the LRM 14.3.4, line 21 on the END_OF_PAGE command

    "Returns TRUE if the combination of a line terminator and a page
     terminator is next, or if a file terminator is next; otherwise
     returns FALSE."

Notice the word "or".  So it sounds like you could have
	.				.
	.				.
	.		    or		.
      <eol>			      <eof>
      <eop>

terminate a page.  Logically speaking, an <eop> can't go without
an <eof>.  Now let's look at the description of END_OF_FILE.

    "Returns TRUE if a file terminator is next, or if the combination
     of a line, a page, and a file terminator is next; otherwise
     returns FALSE."

Notice how the "or" above is now an "and".  So this says you can have
        .				.
	.				.
	.		    or		.
      <eol>			      <eof>
      <eop>
      <eof>

terminate a file.  Now what does
	.
        .
	.
      <eol>
      <eof>
do? This seems like a logical condition, yet it is not explained.  Is
it true that each is a stronger condition; that is, when you have end
of page, you have end of line; when you have end of file, you have
end of page and end of line?  Can you have and end of file without
having an end of page?
	Scott Simpson
	TRW Space and Defense Sector
	...{decvax,ihnp4,ucbvax}!trwrb!simpson  (UUCP)
	trwrb!simpson@trwind.trw.com		(Internet)