Print

Print


Aleksander Donev wrote:

> If a local variable in a procedure is of derived type with
default-initialized
> components, and does not have the SAVE attribute, it is guaranteed to be
> reinitialized every time the procedure is executed?

The wording in F95 is this:

"Invocation of a procesure that contains a nonsaved local object that is not
a dummy argument, is not accessed by use or host association, has neither
the ALLOCATABLE nor POINTER attribute, and is of derived type in which
default initialization is specified for any direct component, causes those
components of the object to become defined."  14.7.5(19), p289, lines 43-47

So the answer to your question, subject to the additional restrictions
specified in the standard, is 'Yes'.

Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH