181. ASSOCIATE to an array-valued expression allocates an array.#

topic: Associate

Note

This tip is a draft1.

Also possible is allocation on assignment

real, allocatable :: x(:) x = [1.0,2.0] ! works even if x is allocated

or ASSOCIATE with an array-valued expression

ASSOCIATE (x => [1.0,2.0]) ! x is fixed within ASSOCIATE block … END ASSOCIATE

as shown in the last code.



1

From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.