10.07.2015 Views

PGI Fortran Reference manual - The Portland Group

PGI Fortran Reference manual - The Portland Group

PGI Fortran Reference manual - The Portland Group

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

<strong>Fortran</strong> StatementsDescriptionBeing volatile indicates to the compiler that, at any time, the variable might change or beexamined from outside the <strong>Fortran</strong> program. <strong>The</strong> impact on the programmer is that anytimea volatile variable is referenced, the value must be loaded from memory. Furthermore, anyassignment to the volatile variable must be written to memory.If nitem names a common block, all members of the block are volatile. <strong>The</strong> volatile attribute of avariable is inherited by any direct or indirect equivalences, as shown in the example.Volatile Attribute Example<strong>The</strong> following example declares both the integer variable xyz and the real variable abc to bevolatile.integer, volatile :: xyzreal :: abcvolatile :: abcVolatile Statement ExampleCOMMON /COM/ C1, C2VOLATILE /COM/, DIR ! /COM/ and DIR are volatileEQUIVALENCE (DIR, X) ! X is volatileEQUIVALENCE (X, Y ) ! Y is volatile3.23. WAITPerforms a wait operation for specified pending asynchronous data transfer operations.F2003SyntaxWAIT (wait_specs_list)wait_specs_list can include any of the following specifiers:UNIT = ] file-unit-numberA file-unit-number must be specified. If the optional characters UNIT= are omitted, the fileunit-numberis the first item in the wait-spec-list.END = labellabel must be the statement label of a branch target statement that appears in the samescoping unit as the WAIT statement.END= specifier has no effect if the pending data transfer operation is not a READ.<strong>PGI</strong> <strong>Fortran</strong> <strong>Reference</strong> Guide 62

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

Saved successfully!

Ooh no, something went wrong!