No. That's not the way the optionality notation works. It is not like
the use of [] in BNF. The [] around a set of arguments means that those
arguments are optional. When the brackets surround multiple arguments,
it does *NOT* mean that it is an all-or-none thing. If you look at the
intrinsics, you will see several that would obviously be ludicrous if
that were the meaning. For a great example, look at date_and_time. Do
you really think that the only two valid forms for date_and_time are to
specify all of the arguments or none of them? (Slightly amusing that
specifying none is actually a valid option, though I can imagine useful
cases of that). Plenty of other examples; that's just a particularly
ludicrous one. But in short, just no; that's not the meaning of that
syntax. See f2003 Note 13.2 for specific examples of how to interpret
the syntax.
You really can't catch all the possibilities for arguments using BNF, so
the standard doesn't try. It could have used overly verbose syntax like
MAXLOC(ARRAY [, MASK [, KIND], BACK]]])
which at least would describe the purely positional cases, but that
still wouldn't describe the possibilities with keyword arguments. In the
words of the standard (f2003 13.2) "the names of the optional arguments
are enclosed in square brackets in the description headings and in lists
of procediures." Nothing about having to use all of them if you use any.
Again, this is *NOT* bnf; it is just a concise way to indicate which
arguments are optional.
You can call MAXLOC with 2 positional arguments and have the 2nd
argument be either MASK or DIM. Which it is depends on the type.
--
Richard Maine
email: last name at domain . net
dimnain: summer-triangle