From the FMSLogo manual for TO:
The default number of inputs for a procedure, which is
the number of inputs that it will accept if its
invocation is not enclosed in parentheses, is
ordinarily equal to the minimum number. If you want a
different default number you can indicate that by
putting the desired default number as the last thing on
the TO line.
Based on this, the following line should be illegal
because the default number of inputs is not the last value:
TO BAD :A 1 :B
OUTPUT LIST :a :b
END
However, this actually does define BAD, but in a way
that makes it uncallable:
BAD 1
not enough inputs to BAD
BAD 1 2
b has no value in BAD
[OUTPUT LIST :A :B]
UCBLogo 5.5 does not handle this any better
BAD 1
not enough inputs to BAD
BAD 1 2
too many inputs to BAD
In my opinion, it would be better if FMSLogo threw a
bad input error, rather than defining a procedure that
the programmer didn't intend.
How Reproducible:
Every Time
Steps to Reproduce:
TO BAD :A 1 :B
What Happens:
FMSLogo prompts you for the body of BAD
Expected Result:
TO doesn't like :B as input.