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.

[Solved] Limit result

Help for those learning Tcl or writing their own scripts.
Post Reply
w
w00f
Halfop
Posts: 49
Joined: Wed Oct 04, 2006 6:50 pm

[Solved] Limit result

Post by w00f »

hi there \o.

I have a dumb question , but i can't solve it :/

Code: Select all

[expr $numb*100/$numb + 0.0]
for example the result was 15.546576874687853 , i want to limit the result to *.###, in this example the result that i wanted was 15.546.

tnks in advance.
Last edited by w00f on Tue Dec 05, 2006 9:20 pm, edited 1 time in total.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

take a look at the format command

the output spec you need is %.3f
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
A
Access
Voice
Posts: 22
Joined: Sun Jun 04, 2006 6:31 am

Post by Access »

i think u want 15.547
w
w00f
Halfop
Posts: 49
Joined: Wed Oct 04, 2006 6:50 pm

Post by w00f »

tnks demond []

Solved the problem.

@Access in this case, that doesn't make any difference, tnks anyway
Post Reply