You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the manual section "8.1 Procedure Definition", optional inputs are represented by the following notation:
[:inputname default.value.expression]
The following notation is on the other side valid:
[inputname default.value.expression]
as can be seen in the following example:
to add [num 2]
output sum 3 :num
end
to add1 [:num 2]
output sum 3 :num
end
? show add
5
? show add1
5
? show text "add
[[[num 2]] [output sum 3 :num]]
? show text "add1
[[[num 2]] [output sum 3 :num]]
Please note that "fulltext" preserves the differences:
? show fulltext "add
[to add [num 2] output sum 3 :num end]
? show fulltext "add1
[to add1 [:num 2] output sum 3 :num end]
I wonder if this alternative notation could be explainded in the manual.
Yours
Guido Gay
The text was updated successfully, but these errors were encountered:
Sorry, I didn't notice this clear explanation in the manual (pages 4-5, Introduction):
One final point: The TO command in Logo has always been a special case; the rest of the
line starting with TO is not evaluated as ordinary Logo expressions are. In particular, the
colons used to mark the names of inputs to the procedure do not cause THING to be invoked.
They are merely mnemonic aids, reminding the Logo user that these words are names of
variables. ... Berkeley Logo therefore makes the colons optional:
TO FOO :IN1 :IN2
and
TO FOO IN1 IN2
are both allowed.
In the manual section "8.1 Procedure Definition", optional inputs are represented by the following notation:
[:inputname default.value.expression]
The following notation is on the other side valid:
[inputname default.value.expression]
as can be seen in the following example:
I wonder if this alternative notation could be explainded in the manual.
Yours
Guido Gay
The text was updated successfully, but these errors were encountered: