Re: Optional arguments (again) on Sun

On Feb 19, 4:03 pm, nos...@xxxxxxxxxxxxx (Richard Maine) wrote:
Salvatore <sfilipp...@xxxxxxxxxxx> wrote:
Ah. yes, I was missing the small print on the SIZE description,

[that dim must not be an optional dummy argument]

The reason for that small print is that having dim changes the rank of
the result. F90/95/2003 is designed so that the rank of everything is
known at compile time. The presence of an optional dummy argument is not
in general known until run time (and may vary from call to call).

Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain

However, according to my copy of M&R,

"size(array,[dim=]) returns a scalar default integer that is the size
of the array array or extent along dimension dim .... "

so it would seem that your explanation, while certainly appropriate
for LBOUND/UBOUND, is at least surprising here where there seems to
be no such change of rank.