Re: optional assumed-shape array



In article <1ihwfcx.191ny0pvt9bggN%nospam@xxxxxxxxxxxxx>,
nospam@xxxxxxxxxxxxx (Richard Maine) wrote:

mecej4 <mecej4_spam_nyet@xxxxxxxxxxxxx> wrote:

Richard Maine wrote:

real, allocatable :: ai_local(:)
...
if (present(ai)) then
allocate(ai_local(size(ai)))

Shouldn't a check be made for ai having been allocated before using its
contents?

ai isn't allocatable (see the OP's code), so no.


Oops, you're right. My previous reply was about the local array,
not the dummy array. I didn't answer the question that was actually
asked.

$.02 -Ron Shepard
.