HP Fortran Programmer's Reference (September 2007)

Arrays
Array-valued structure component references
Chapter 374
PRINT *, course(2)%student(1:3)%test(4)
! the following commented-out statement is illegal:
! only one part (of the combined components and
! parent) in a structure component reference
! may have a rank greater than 0.
! course%student%test = 0
END PROGRAM main
Here are the command lines to compile and execute the program, along with the output from
a sample run:
$ f90 array_val_ref.f90
$ a.out
95
60 60 60 60 60 60 60 60 60 60
0 0 0 0
82 82 82