Is there a way to skip some middle optional arguments? For example for this function:
f[{a_: 80, b_: 90}, {c_: 30, d_: 20}] :=
Print["a=", a, ", b=", b, ", c=", c, ", d=", d]
Call something like this:
f[{(* empty or some symbols*), 3}, {4, 5}]
and get the result:
a=80, b=3, c=4, d=5
P.S. Function will have many parameters and will have complicated form, so the answer described here may be not applicable.
Longest
. Another option is to explicitly passAutomatic
or similar to the function, and then do some preprocessing inside the function. But personally, I would strongly consider just passing in all values as named options in cases like these: Then it is trivial to skip arguments, and it is very clear which arguments are assigned for any given call $\endgroup$