Two new things in CVS that I think should be
uncontroversial, but please let me know if any
breakage results:
* Up till now it has been impossible to give a scalar
parameter to a user-defined function a default value of
NA. This is partly because NA was used as the internal
representation for "no value set". However, it seemed
to me that in some cases it may be useful to set a
default of NA for a trailing parameter, meaning that
if the user omits a value for that parameter, it
should then be ignored (not used) within the function.
This is now possible, but note, only for parameters
of type "scalar", not "bool" or "int".
* Evaluation of boolean "&&" and "||": up till now
we have evaluated both sides of these booleans
before creating the result. But evaluation of the
right-hand branch is redundant if (a) the operator
is && and the left is FALSE, or (b) the operator
is || and the left is TRUE. Now we skip evaluation
on the right when it's redundant. Besides being
more efficient this fixes a problem with NAs.
Let the scalars x = 2, y = NA. Before the change
if x > 1 || y > 10
would produce an error, since "y > 10" can't be
evaluated. Now it works OK.
Allin