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.

expr question

Old posts that have not been replied to for several years.
Locked
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

expr question

Post by Ofloo »

Seems silly but ive read the tcl manual several times on the expr part but i can't seem to find a command that applys to that ..

Code: Select all

[expr 23 / 1024.0] # result: 0,0224609375
how do i make it so that it only shows 2 digits: 0,02.
XplaiN but think of me as stupid
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: expr question

Post by user »

This has been discussed before iirc...

Code: Select all

format %.2f [expr {1/3.}]
Have you ever read "The Manual"?
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

ah hmm k sorry i only found stuff that was useless to me at this time :p realy sorry hehe tanges sinus .. stuff like that hehe

Thank u so mutch for being so kind to reply my question :) anyway
XplaiN but think of me as stupid
Locked