This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
brood
Voice
Posts: 30 Joined: Thu Sep 01, 2005 4:12 am
Post
by brood » Sun Jul 01, 2007 1:47 pm
To count the colums i use:
Lets say the output is $cnt: 1392
Is it possible to let is show like: 1.392 (with the dot)
Same ofcourse if the count its more then a million: 1.234.323
thanks
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Jul 01, 2007 5:49 pm
Code: Select all
if {[string len $number]>3} {
for {set j [expr {[string len $number]-3}]} {$j > 0} {incr j -3} {
set number [string range $number 0 [expr {$j-1}]].[string range $number $j end]
}
}
brood
Voice
Posts: 30 Joined: Thu Sep 01, 2005 4:12 am
Post
by brood » Sun Jul 01, 2007 6:14 pm
thanks