Subject: hpff-doc: io-ext.tex

From: Piyush Mehrotra <[email-masked]>
Date: Tue, 15 Oct 1996 11:50:42 -0400 (EDT)

---------------------------------------------------------------------------
[email-masked] is a mailing list for HPF 2.0 language specification
authors and editors.  Instructions for adding or deleting yourself from this
list appear at the bottom of this message.
---------------------------------------------------------------------------

It would stand out better if all changes to the Fortran standard be
distinguished from the text by emphasizing and maybe quotation as shown
below. Also we should just put the WAIT statement as a regular subsection
in the HPF document instead of suggesting that it become a specific section 
in the standard (we didn't do it for forall).

Page 202 Line 17:
Should this be Fortran 90 standard or Fortran 95?

Page 202 Line 33
Replace
	specifing
with 
	specifying

Page 202 Line 44
Replace
	tranfer
with
	transfer

Page 203 Line 17 - 21:
Replace:
    Advice to users:

    Note: we still permit left-to-right definition of the I/O list on a READ.
    This means that
    READ(10,ID=5,REC=10) I,A(I) is legal and has the same semantics as a
    synchronous READ ]

    End advice to users.
with
    \begin{users}
    Note: we still permit left-to-right definition of the I/O list on a READ.
    This means that
    READ(10,ID=5,REC=10) I,A(I) is legal and has the same semantics as a
    synchronous READ ]
    \end{users}

Page 203 Line 21-22
Replace:
    To section 9, change "and {\tt INQUIRE} statements" to
    ", {\tt INQUIRE}, and {\tt WAIT} statements".

with 
    In section 9, change ``{\em and {\tt INQUIRE} statements}}'' to
    ``{\em , {\tt INQUIRE}, and {\tt WAIT} statements}''.

Page 203 Line 23-25
Replace:
    Add a new section 9.4.7:

    9.4.7 WAIT statement
with
\section{WAIT Statement}

Below I am giving the stuff in the first part of this section which
the additions/modifications to Fortran emphasized and quoted:

To section 9.4.1, Rule R912, add

\begin{quote}
                                                                        \BNF
io-control-spec            \IS ID = scalar-default-int-variable
                                                                        \FNB

\end{quote}
To section 9.4.1, Rule R912 constraints add

\begin{quote}
\em
\begin{constraints}

\item If an {\tt ID=} specifier appears, then no function reference may appear
in an expression anywhere in the data transfer statement.

\end{constraints}

\end{quote}
To section 9.7, add the following text:

\begin{quote}
\em
If an {\tt ID=} specifier appears, then no function reference may appear
in an expression anywhere in the data transfer statement.
\end{quote}

At the end of section 9.4.1, add the following paragraph:

\begin{quote}
\em
The addition of the {\tt ID=} specifier results in the initiation of an
asynchronous data transfer.  The data transfer statement must be
eventually followed by an {\tt WAIT} statement specifying the same
{\tt ID} value that was returned to the {\tt ID} variable in an data transfer
statement.  This {\tt WAIT} statement is called the
matching {\tt WAIT} statement. Note that asynchronous data transfer must
be direct and unformatted.
\end{quote}

Insert the following text at the end of section 9.4.3 before the
final paragraph:

\begin{quote}
\em
For an asynchronous data transfer, errors or end-of-file conditions
may occur either during execution of the data transfer statement or
during subsequent data transfer.  Should these conditions not
result in termination of the program then these conditions will
be detectable by the programmer via {\tt ERR=} and {\tt IOSTAT=}
specifiers in the matching {\tt WAIT} statement.
\end{quote}

Alter the paragraph at the end of 9.4.3 to read as follows:

\begin{quote}
\em
Execution of the executable program is terminated if an error condition
occurs during execution or during subsequent data transfer
of an input/output statement that contains neither
an {IOSTAT=} nor an {ERR=} specifier.

Should an asynchronous data transfer statement cause the {\tt ERR} or
{\tt IOSTAT}
variables to be set then any matching
{\tt WAIT} statement will do the same.
\end{quote}

To section 9.4.4, alter operation 8 to read as follows:

\begin{quote}
\em
\begin{itemize}

\item  (8) Cause any variables specified in the {\tt IOSTAT=},
{\tt SIZE=} and
{\tt ID=} specifiers to become defined.

\end{itemize}
\end{quote}

To section 9.4.4, add the following three paragraphs:

\begin{quote}
\em
For asynchronous data transfers steps 1-8 correspond to both
the asynchronous data transfer statement and the matching {\tt WAIT}
statement.  Steps 4-7 may occur asynchronously with program
execution.  If an implementation does not support asynchronous
data transfers then steps 1-8 may be performed by the asynchronous
data transfer statement,  the matching {\tt WAIT} statement must still
be executed, the only effect being to return status information.

In the portion of the program which executes between the asynchronous data
transfer input/output statement and the matching {\tt WAIT},
no entity appearing
in an expression anywhere in the input/output list may be assigned to
or accessed.

Multiple outstanding asynchronous data transfer operations are allowed
but they must all be reads or
writes. No other I/O statements on the same unit are allowed until all
{\tt WAIT} requests are satisfied.
If two {\tt WRITE} statements which specify the same
record number are executed, then the program is non-conforming.
\end{quote}

---------------------------------------------------------------------------
To (un)subscribe to this list, send mail to [email-masked].
Leave the subject line blank, and in the body put the line
(un)subscribe <email-address>
---------------------------------------------------------------------------