HP Fortran Programmer's Reference (September 2007)

Arrays
Array expressions
Chapter 378
! the effect is as if the scalar were broadcast into a
! temporary array, with the same shape as b; b is then assigned
! to theleft-hand side
b = 0.0
! corresponding elements of a and d are added together and then
! stored back into the corresponding array element of d
d = a + d
! conceptually the operand SQRT(d) is evaluated into an
! intermediate array with the same shape as d; each element of
! the intermediate array will be added to the corresponding
! element of a and stored into the corresponding element of d
d = a + SQRT(d)
DEALLOCATE(d)
! examples of illegal uses of arrays:
! ILLEGAL - c is an assumed-size array and so has no shape;
! an assumed-size array may not be used as a whole array
! operand(except in an argument list)
a = c
! ILLEGAL - the arrays a and b do not have the same shape and are
! therefore not conformable
a = a + b
! ILLEGAL - d was previously deallocated and must not be
! referenced subsequently
a = a + d
END SUBROUTINE foo