I'm learning Tcl. In Perl I can do this:
$ perl -e 'for ($i = 0; $i < 5; $i++) { printf("name%03d\n", $i) }'
name000
name001
name002
name003
name004
Can I do this in Tcl?
I'm learning Tcl. In Perl I can do this:
$ perl -e 'for ($i = 0; $i < 5; $i++) { printf("name%03d\n", $i) }'
name000
name001
name002
name003
name004
Can I do this in Tcl?
See format:
$ tclsh
% for {set i 0} {$i < 5} {incr i} { puts [format "name%03d" $i] }
name000
name001
name002
name003
name004