02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BUFFER IN (extension)<br />

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

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

BUFFER IN (extension)<br />

NOTE Asynchronous I/O with the BUFFER IN 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 IN (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 IN statement is an <strong>HP</strong> <strong>Fortran</strong> extension that provides compatibility with the<br />

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

subsequent statements to execute concurrently.<br />

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

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

Other <strong>Fortran</strong> I/O statements (i.e., READ, WRITE, PRINT, ACCEPT, and TYPE) cannot<br />

be used on the same unit as the BUFFER IN statement. Mixing the standard <strong>Fortran</strong> 90<br />

I/O operations with BUFFER IN on the same logical unit number can confuse the input<br />

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 IN statement. Such files are referred to as pure-data<br />

(unblocked) files.<br />

Examples<br />

The following program shows how to use the BUFFER IN and BUFFER OUT statements. The<br />

program must be compiled with the +autodbl option.<br />

Chapter 10 251

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

Saved successfully!

Ooh no, something went wrong!