of the scalar. If it is an array, its elements, in array element order, are treated as successive records of the file and each has length that of an array element. An example using a write statement is integer :: day real :: cash character(len=50) :: line : ! write into line write (unit=line, fmt="(a, i2, a, f8.2, a)") "Takings for day ", day, " are ", cash, " dollars" that might write Takings for day 3 are 4329.15 dollars List-directed I/O An example of a read without a specified format for input is integer :: i real :: a complex, dimension(2) :: field logical :: flag character(len=12) :: title character(len=4) :: word : read *, i, a, field, flag, title, word If this reads the input record 10 6.4 (1.0,0.0) (2.0,0.0) t test/ (in which blanks are used as separators), then i, a, field, flag, and title will acquire the values 10, 6.4, (1.0,0.0) and (2.0,0.0), .true. and test respectively, while word remains unchanged. Quotation marks or apostrophes are required as delimiters for a string that contains a blank. Non-advancing I/O This is a form of reading and writing without always advancing the file position to ahead of the next record. Whereas an advancing I/O statement always repositions the file after the last record accessed, a non-advancing I/O statement performs no such repositioning and may therefore leave the file positioned within a record. character(len=3) :: key integer :: u, s, ios : read(unit=u, fmt="(a3)", advance="no", size=s, iostat=ios) key if (ios == 0) then : else ! key is not in one record key(s+1:) = "" : end if A non-advancing read might read the first few characters of a record and a normal read the remainder. In order to write a prompt to a terminal screen and to read from the next character position on the screen without an intervening line-feed, we can write write (unit=*, fmt="(a)", advance="no") "enter next prime number:" read (unit=*, fmt="(i10)") prime_number Non-advancing I/O is for external files, and is not available for list-directed I/O. Edit descriptors It is possible to specify that an edit descriptor be repeated a specified number of times, using a repeat count: 10f12.3 The slash edit descriptor (see below) may have a repeat count, and a repeat count can also apply to a group of edit descriptors, enclosed in parentheses, with nesting: print "(2(2i5,2f8.2))", i(1),i(2),a(1),a(2), i(3),i(4),a(3),a(4) Entire format specifications can