<?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/12092" />

	<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>2006-07-07T05:03:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-07-07T05:03:01-04:00</updated>

		<published>2006-07-07T05:03:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64521#p64521</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64521#p64521"/>
		<title type="html"><![CDATA[Decimal numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64521#p64521"><![CDATA[
round() will round to the closest number. For example:<blockquote class="uncited"><div>% expr round(1.2)<br>1<br>% expr round(1.6)<br>2</div></blockquote>floor() will round to the lower and ceil() will round to the greater.<blockquote class="uncited"><div>% expr floor(1.6)<br>1.0<br>% expr ceil(1.6)<br>2.0</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Jul 07, 2006 5:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-07-06T07:07:16-04:00</updated>

		<published>2006-07-06T07:07:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64512#p64512</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64512#p64512"/>
		<title type="html"><![CDATA[Decimal numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64512#p64512"><![CDATA[
int() will cut off string after the decimal point, round() will do the same, but adding 0.5 before doing so <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Jul 06, 2006 7:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[IRCNick]]></name></author>
		<updated>2006-07-03T18:34:50-04:00</updated>

		<published>2006-07-03T18:34:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64484#p64484</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64484#p64484"/>
		<title type="html"><![CDATA[Decimal numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64484#p64484"><![CDATA[
Thank you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6849">IRCNick</a> — Mon Jul 03, 2006 6:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-07-03T17:27:07-04:00</updated>

		<published>2006-07-03T17:27:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64483#p64483</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64483#p64483"/>
		<title type="html"><![CDATA[Decimal numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64483#p64483"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set result [expr {int($result)}]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Jul 03, 2006 5:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[IRCNick]]></name></author>
		<updated>2006-07-03T15:06:45-04:00</updated>

		<published>2006-07-03T15:06:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64480#p64480</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64480#p64480"/>
		<title type="html"><![CDATA[Decimal numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64480#p64480"><![CDATA[
Ok it works, but now I have a double value for the result. How can I convert it to integer ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6849">IRCNick</a> — Mon Jul 03, 2006 3:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-07-02T06:37:51-04:00</updated>

		<published>2006-07-02T06:37:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64467#p64467</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64467#p64467"/>
		<title type="html"><![CDATA[Decimal numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64467#p64467"><![CDATA[
Add a decimal point to the number you're dividing by. For example:<div class="codebox"><p>Code: </p><pre><code>set c [expr (($a / 100.) * ($sum / 100.)) * 100]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jul 02, 2006 6:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[IRCNick]]></name></author>
		<updated>2006-07-02T05:16:14-04:00</updated>

		<published>2006-07-02T05:16:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64466#p64466</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64466#p64466"/>
		<title type="html"><![CDATA[Decimal numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64466#p64466"><![CDATA[
Hi, I have a problem with the decimal numbers. How can make my script to show and calculate decimal numbers ? Should I use the package "Decimal arithmetic" or there is other way to do what I need ? <br><br>This is a sample of that what I'm trying to do:<br><div class="codebox"><p>Code: </p><pre><code>set a 12; set b 20; set sum [expr ($a + $b)]set c [expr (($a / 100) * ($sum / 100)) * 100]set d [expr (($b / 100) * ($sum / 100)) * 100]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6849">IRCNick</a> — Sun Jul 02, 2006 5:16 am</p><hr />
]]></content>
	</entry>
	</feed>
