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

	<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-05-06T14:37:30-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-05-06T14:37:30-04:00</updated>

		<published>2003-05-06T14:37:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19882#p19882</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19882#p19882"/>
		<title type="html"><![CDATA[commas]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19882#p19882"><![CDATA[
Here's another solution which lets you decide the splitting frequency and char.<div class="codebox"><p>Code: </p><pre><code>proc splitNumber {number {every 3} {by ,}} {while {[regsub ^(\[-+\]?\\d+)(\\d\{$every\}) $number \\1$by\\2 number]} {}set number}</code></pre></div>usage examples:<br><div class="codebox"><p>Code: </p><pre><code>splitNumber 10000returns: 10,000splitNumber 10000 4 .returns: 1.0000</code></pre></div>probably not very useful for most of you out there anyway <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue May 06, 2003 2:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-05-06T05:23:39-04:00</updated>

		<published>2003-05-06T05:23:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19872#p19872</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19872#p19872"/>
		<title type="html"><![CDATA[commas]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19872#p19872"><![CDATA[
I am sure there is a regsub procedure on the forum from many many moons ago, that took care of this in a quick and simple step. I sugest you search for this, however, here is a normal version.<br><div class="codebox"><p>Code: </p><pre><code>proc groupdigits {in {sep {,}}} {  set out ""  set in [split $in {}]  while {[llength $in]} {    set out "${sep}[join [lrange $in end-2 end] {}]${out}"    set in [lreplace $in end-2 end]  }  return [string trimleft $out $sep]}</code></pre></div>Use it like so<br><div class="codebox"><p>Code: </p><pre><code>groupdigits 1000010,000groupdigits 1000000000 @1@000@000@000</code></pre></div>It defaults to a seperator of ",", but will take other with the second parameter (not needed).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue May 06, 2003 5:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BrollY]]></name></author>
		<updated>2003-05-05T20:14:52-04:00</updated>

		<published>2003-05-05T20:14:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19866#p19866</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19866#p19866"/>
		<title type="html"><![CDATA[commas]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19866#p19866"><![CDATA[
was wondering if anyone had a code to put commas in really long numbers, such as 1000000 would be turned into 1,000,000. i currently have a piece of code that does this for me that i got from a site, but its kinda "not working" right with some of my scripts.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3056">BrollY</a> — Mon May 05, 2003 8:14 pm</p><hr />
]]></content>
	</entry>
	</feed>
