02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

BUFFER OUT (extension)<br />

Provided for compatibility with Cray BUFFER OUT statement.<br />

<strong>HP</strong> <strong>Fortran</strong> statements<br />

BUFFER OUT (extension)<br />

NOTE Asynchronous I/O with the BUFFER OUT statements is not supported. <strong>HP</strong><br />

<strong>Fortran</strong> 90 Draft supports these statements for synchronous I/O only.<br />

Syntax<br />

BUFFER OUT (unit, mode) (begin-loc, end-loc)<br />

unit is a unit identifier (integer expression).<br />

mode is ignored.<br />

begin-loc, end-loc are symbolic names of the variables, arrays, or array elements that<br />

mark the beginning and end locations of the BUFFER IN operation.<br />

begin-loc and end-loc must be either elements of a single array (or<br />

equivalenced to an array) or members of the same common block.<br />

Description<br />

The BUFFER OUT statement is an <strong>HP</strong> <strong>Fortran</strong> extension that provides compatibility with<br />

the Cray BUFFER OUT feature. The statement causes data to be transferred while allowing<br />

any subsequent statements to execute concurrently.<br />

The BUFFER OUT statement is provided as a porting aid for existing Cray code; it typically<br />

will not produce noticeably superior performance compared to conventional <strong>Fortran</strong> 90 I/O<br />

methods. In fact, the BUFFER OUT statement will always be slightly slower than<br />

unformatted fixed record length I/O.<br />

Other <strong>Fortran</strong> I/O statements (for example, READ, WRITE, PRINT, ACCEPT, and TYPE)<br />

cannot be used on the same unit as the BUFFER OUT statement. Mixing the standard<br />

<strong>Fortran</strong> 90 I/O operations with BUFFER OUT on the same logical unit number can<br />

confuse the input stream (READ) or corrupt the data file (WRITE).<br />

The BACKSPACE statement cannot be used with files that are capable of being<br />

transferred by the BUFFER OUT statement. Such files are referred to as pure-data<br />

(unblocked) files.<br />

Examples<br />

For an example of BUFFER IN, see “BUFFER IN (extension)” on page 251.<br />

Chapter 10 253

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!