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.

Arrays<br />

Array-valued structure component references<br />

72<br />

PRINT *, course(2)%student(1:3)%test(4)<br />

! the following commented-out statement is illegal:<br />

! only one part (of the combined components and<br />

! parent) in a structure component reference<br />

! may have a rank greater than 0.<br />

! course%student%test = 0<br />

END PROGRAM main<br />

Here are the command lines to compile and execute the program, along with the output from<br />

asamplerun:<br />

$ f90 array_val_ref.f90<br />

$ a.out<br />

95<br />

60 60 60 60 60 60 60 60 60 60<br />

0 0 0 0<br />

82 82 82<br />

Chapter 4

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

Saved successfully!

Ooh no, something went wrong!