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.

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

TARGET (statement and attribute)<br />

! make p point to a rank-2 section of t<br />

p => t(10,1:10,2:5)<br />

REAL, POINTER :: nootka(:), talk(:)<br />

REAL, ALLOCATABLE, TARGET :: x(:)<br />

ALLOCATE (x(1:100), STAT = is)<br />

nootka => x(51:100)<br />

! Pointer assignment statements<br />

talk => x(1:50)<br />

REAL r, p1, p2<br />

TARGET r<br />

POINTER p1, p2<br />

r = 4.7<br />

! make both p1 and p2 aliases of r<br />

p1 => r<br />

p2 => p1<br />

...<br />

ALLOCATE (p1)<br />

p1 = 9.4<br />

Related statements<br />

POINTER, ALLOCATE, DEALLOCATE, andNULLIFY<br />

Related concepts<br />

For related information, see the following:<br />

444<br />

“Pointers” on page 49<br />

“Pointer assignment” on page 97<br />

The description of the ASSOCIATED intrinsic in Chapter 11, “Intrinsic procedures,” on<br />

page 467.<br />

Chapter 10

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

Saved successfully!

Ooh no, something went wrong!