▁▁ ▁command Name ▁argument 1 ▁argument 2 ▁... ▁argument N ▁ ▁The ▁following ▁example ▁uses ▁the ▁puts ▁command ▁to ▁display ▁a ▁string ▁of ▁text ▁on ▁the ▁host ▁console : ▁ ▁puts ▁" Hello , ▁World !" ▁ ▁This ▁sends ▁the ▁string ▁" Hello , ▁World !" ▁to ▁the ▁standard ▁output ▁device ▁along ▁with ▁an ▁app ended ▁newline ▁character . ▁ ▁Vari ables ▁and ▁the ▁results ▁of ▁other ▁commands ▁can ▁be ▁subst it uted ▁into ▁strings , ▁such ▁as ▁in ▁this ▁example ▁which ▁uses ▁the ▁set ▁and ▁expr ▁commands ▁to ▁store ▁the ▁result ▁of ▁a ▁calculation ▁in ▁a ▁variable ▁( note ▁that ▁T cl ▁does ▁not ▁use ▁= ▁as ▁an ▁assignment ▁operator ), ▁and ▁then ▁uses ▁puts ▁( short ▁for ▁" put ▁string ") ▁to ▁print ▁the ▁result ▁together ▁with ▁some ▁explan atory ▁text : ▁ ▁# ▁expr ▁evalu ates ▁text ▁string ▁as ▁an ▁expression ▁set ▁sum ▁[ expr ▁ 1 + 2 + 3 + 4 + 5 ] ▁puts ▁" The ▁sum ▁of ▁the ▁numbers ▁ 1 .. 5 ▁is ▁$ sum ." ▁ ▁The ▁# ▁character ▁introdu ces ▁a ▁comment . ▁Comment s ▁can ▁appear ▁anywhere ▁the ▁interpreter ▁is ▁expecting ▁a ▁command ▁name . ▁ ▁# ▁with ▁cur ly ▁bra ces , ▁variable ▁substitution ▁is ▁performed ▁by ▁expr ▁set ▁x ▁ 1 ▁set ▁sum ▁[ expr ▁{$ x ▁+ ▁ 2 ▁+ ▁ 3 ▁+ ▁ 4 ▁+ ▁ 5 } ]; ▁# ▁$ x ▁is ▁not ▁subst it uted ▁before ▁passing ▁the ▁parameter ▁to ▁expr ; ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▁▁▁▁▁ ▁#