This section describes the components of I/O list (iolist), which can be specified as elements of the I/O statements described in this section. An input/output list specifies the memory locations of the data to be transferred by the I/O statements READ, WRITE, and PRINT.
If an array name is given as an I/O list item, the elements in the array are treated as though each element were explicitly specified in the I/O list in storage order. Note that the name of an assumed-size dummy array (that is, an array declared with an * for an upper bound) must not appear as an I/O list item.
An input list item can be one of the following:
Examples of input lists areREAD(5,3000,END=2000)X,Y(J,K+3),C(2:4)
An output list item can be one of the following:
Note that a constant, an expression involving operators or function references, or an expression enclosed in parentheses may appear in an output list but not in an input list.
An example of an output list isWRITE(5,200,ERR=10)'ANSWER IS',N,SQRT(X)+1.23
An implied-DO list is a specification that follows the I/O list (iolist) in an I/O statement. The list permits the iteration of the statement as though it were contained within a DO loop. An implied-DO list has the form:
iolist is one or more valid names of the data to be acted on.
i is an iteration count.
e1, e2, and e3 are control parameters
The control variable i must not appear as an input list item in iolist. The list items in iolist are specified once for each iteration of the implied DO list with the appropriate substitution of values for each occurrence of the control variable i. When an I/O error occurs within the implied DO loop, the value of the control variable i is undefined.
The following statements write Hello World to standard output 100 times:
Fortran Elements And Concepts
Constants And Data Structures
Assignment And Data Statements
Statement Functions And Subprograms
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.