next up previous index
Next: Variable Number of Up: Procedures Previous: Procedures

Default Arguments

  Some of the procedure arguments may have a default value, which is taken when the procedure is invoked with less arguments. The defaulted arguments must be the last ones:

% proc out {{a 1} {b 2} {c 3}} {
    puts "$a $b $c"
}
% out
1 2 3
% out 5
5 2 3
% out 5 8
5 8 3


Micha Meier
Tue Jul 2 09:49:39 MET DST 1996