2019-11-28

Tcl: Two Fer

Create a sentence of the form "One for X, one for me.".

#!/usr/bin/env tclsh

if {$argc >= 1} {
    set name [lindex $argv 0]
} elseif {$argc == 0} {
    set name "you"
}

puts "One for $name, one for me."

沒有留言: