<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/4870" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2003-07-01T11:20:45-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/4870</id>

		<entry>
		<author><name><![CDATA[BiLL]]></name></author>
		<updated>2003-07-01T11:20:45-04:00</updated>

		<published>2003-07-01T11:20:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22824#p22824</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22824#p22824"/>
		<title type="html"><![CDATA[Percents]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22824#p22824"><![CDATA[
awesome<br>thanks user<br>and thanks ppslim for that proc - WORKS GREAT!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=50">BiLL</a> — Tue Jul 01, 2003 11:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-07-01T10:56:16-04:00</updated>

		<published>2003-07-01T10:56:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22821#p22821</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22821#p22821"/>
		<title type="html"><![CDATA[Percents]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22821#p22821"><![CDATA[
either<div class="codebox"><p>Code: </p><pre><code>format %.1f &lt;insert result here&gt;</code></pre></div>(format will just chop off extra digits, so the result might not be what you want.) or<div class="codebox"><p>Code: </p><pre><code>set tcl_precision 1</code></pre></div>before the expr...but that will result in every calculation having this lousy precision <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>EDIT: format does rounding..so go ahead and use it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Jul 01, 2003 10:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-07-01T10:54:25-04:00</updated>

		<published>2003-07-01T10:54:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22820#p22820</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22820#p22820"/>
		<title type="html"><![CDATA[Percents]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22820#p22820"><![CDATA[
Nice, I come by and see this.<br><br>This should do you. However, it isn't same, and you need to make sure that what it being passed to the proc, is infact a number.<br><div class="codebox"><p>Code: </p><pre><code>proc round {in} {  return [expr (round($in * 10) +0.0) / 10]}</code></pre></div>It will allways return a floating point value<br><br>Examples<blockquote class="uncited"><div>round 51 = 51.0<br>round 51.5 = 51.5<br>round 51.55 = 51.6<br>round 51.545 = 51.5</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Jul 01, 2003 10:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BiLL]]></name></author>
		<updated>2003-07-01T10:29:19-04:00</updated>

		<published>2003-07-01T10:29:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22817#p22817</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22817#p22817"/>
		<title type="html"><![CDATA[Percents]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22817#p22817"><![CDATA[
Hi,<br><br>got a question about percents!<br><br>set percent1  [expr (100 / 9.0) * 7]<br>set percent2  [expr (100 / 9.0) * 2]<br><br>that returns<br>percent1 = 77.7777777778%<br>percent2 = 22.2222222222%<br><br>Can anyone help me to make percent1 = 77,8% and percent 2 = 22,2% ?<br>Would be great - thanks!!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=50">BiLL</a> — Tue Jul 01, 2003 10:29 am</p><hr />
]]></content>
	</entry>
	</feed>
