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

	<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>2005-03-03T05:50:05-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2005-03-03T05:50:05-04:00</updated>

		<published>2005-03-03T05:50:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47144#p47144</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47144#p47144"/>
		<title type="html"><![CDATA[http://www.google.com/search?q=clue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47144#p47144"><![CDATA[
<blockquote class="uncited"><div>this seems realy complicated just to split a ',' is it faster ? does uplevel export it outside the proc ? or something cause unless its doing that i must be missing something cause the tokenize is local..</div></blockquote>It does what he requested. (creates the variable(s) in the scope the proc is invoked from)<br><blockquote class="uncited"><div>Replace the comma's by an empty space. Now you have created a list with elements.</div></blockquote>Wrong. You also need to escape alot of special characters. 'split' exists for a reason.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Mar 03, 2005 5:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jagg]]></name></author>
		<updated>2005-03-03T04:20:41-04:00</updated>

		<published>2005-03-03T04:20:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47143#p47143</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47143#p47143"/>
		<title type="html"><![CDATA[comma seperated list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47143#p47143"><![CDATA[
Thanks for your answers!!!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4460">Jagg</a> — Thu Mar 03, 2005 4:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-03-03T04:14:10-04:00</updated>

		<published>2005-03-03T04:14:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47142#p47142</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47142#p47142"/>
		<title type="html"><![CDATA[comma seperated list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47142#p47142"><![CDATA[
Also string map can do the job for you, in only line. Regsub is also an alternative, but string map is faster. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Replace the comma's by an empty space. Now you have created a list with elements. Then foreach element in the list make a variable. Use a counter for the variable's name and the value will be the element.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Thu Mar 03, 2005 4:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-03-02T15:13:30-04:00</updated>

		<published>2005-03-02T15:13:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47136#p47136</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47136#p47136"/>
		<title type="html"><![CDATA[comma seperated list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47136#p47136"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>proc tokenize {str {split " "}} {set i -1foreach v [split $str $split] {uplevel 1 [list set [incr i] $v]}incr i}</code></pre></div>usage: tokenize $yourString ","<br>returns: the number of variables created (the first one is "0")</div></blockquote>this seems realy complicated just to split a ',' is it faster ? does uplevel export it outside the proc ? or something cause unless its doing that i must be missing something cause the tokenize is local..<br><br>sorr just curious can't get a grip on uplevel just yet i know it is something like eval but .. thats it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Wed Mar 02, 2005 3:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2005-03-02T11:37:46-04:00</updated>

		<published>2005-03-02T11:37:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47130#p47130</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47130#p47130"/>
		<title type="html"><![CDATA[comma seperated list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47130#p47130"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc tokenize {str {split " "}} {set i -1foreach v [split $str $split] {uplevel 1 [list set [incr i] $v]}incr i}</code></pre></div>usage: tokenize $yourString ","<br>returns: the number of variables created (the first one is "0")<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Mar 02, 2005 11:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2005-03-02T11:34:17-04:00</updated>

		<published>2005-03-02T11:34:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47129#p47129</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47129#p47129"/>
		<title type="html"><![CDATA[comma seperated list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47129#p47129"><![CDATA[
Simple, <a href="http://tmml.sourceforge.net/doc/tcl/split.html" class="postlink">split</a> then use an <a href="http://tmml.sourceforge.net/doc/tcl/for.html" class="postlink">for</a> to make the variables.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Mar 02, 2005 11:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jagg]]></name></author>
		<updated>2005-03-02T11:15:35-04:00</updated>

		<published>2005-03-02T11:15:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47128#p47128</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47128#p47128"/>
		<title type="html"><![CDATA[comma seperated list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47128#p47128"><![CDATA[
Hi,<br><br>if I have eg<br><br>"2,4,6,8,10,12,14" in a variable. How can "split" that into 9 "different variables" so that <br><br>eg $3 gives me 6<br><br>$1 gives me 2<br><br>and so on....<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4460">Jagg</a> — Wed Mar 02, 2005 11:15 am</p><hr />
]]></content>
	</entry>
	</feed>
