You can't do an assignment, local or worksheet, to the value of a function. What you are actually doing is defining a local function mod (overwriting Mathcad's built in mod function). This assignment works, but the result fails in the context as the left operand of if cannot be a function.
__________________
� � � � Tom Gutman