Command-line arguments: Difference between revisions

m
→‎[[Tcl]]: Fixed formatting
m (→‎[[Tcl]]: Fixed formatting)
Line 39:
[[Category: Tcl]]
 
The pre-defined variable <tt>argc</tt> contains the number of arguments passed to the routine, <tt>argv</itt> contains the arguments as a list. Retrieving the second argument might look something like this:
 
if { $argc > 1 } { puts [lindex $argv 1] }