From: simpson@spp3.UUCP (Scott Simpson)
Subject: END_OF_* Ambiguity?
Date: 17 Jun 88 23:17:00 GMT [thread overview]
Message-ID: <8806172317.AA14235@spp3.SPP> (raw)
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)
reply other threads:[~1988-06-17 23:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox