Delimiter between switches and parameters edit
AMG: In Tcl and in many command line programs,
-- is "the switch to end all switches" (
RS). See
'--' in Tcl for more information on this usage.
Decrement operator edit
In C and a few related languages,
-- is the decrement operator. In Tcl, use [
incr var -1] to decrement a variable and return its new value. To decrement and return the prior value, combine with
K, e.g.:
proc K {a b} {return $a}
puts [K $var [incr var -1]]
Or this weird one-liner:
puts $var[incr var -1; list]
Email signature prefix edit
In email,
-- followed by space then newline is the traditional separator between an email message and the signature.
Long option prefix edit
In many command line programs (typically not Tcl programs),
-- is the prefix for
GNU-style long options, those being options (switches) spelled out with names longer than a single character. For example, "
ls --almost-all" is a more verbose way to say "
ls -A".