format statement: Expanding a string
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

format statement: Expanding a string

From: Scott Brown <None@invensys.com>
Date: Tue Feb 28 2006 - 21:19:06 CET

Hello,
The last statement below fails with a "not enough arguments". This seems
reasonable, but I cannot figure out how to make it work. I need to expand
$pets into its 2 items, but have had no success. Any ideas?
Thanks,
Scott

set myfmt "%-25s %10s";
set pets "Cat Dog";
puts [format $myfmt Cat Dog]; # this one works
puts [format $myfmt $pets]; # this one doesn't
Received on Sun Apr 30 02:18:00 2006