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

	<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>2004-03-18T12:20:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2004-03-18T12:20:03-04:00</updated>

		<published>2004-03-18T12:20:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34753#p34753</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34753#p34753"/>
		<title type="html"><![CDATA[Help with arrays and lists]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34753#p34753"><![CDATA[
refer lappend if you want to add something the list and lreplace to edit in a general TCL help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Mar 18, 2004 12:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-03-17T16:23:55-04:00</updated>

		<published>2004-03-17T16:23:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34726#p34726</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34726#p34726"/>
		<title type="html"><![CDATA[Re: Help with arrays and lists]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34726#p34726"><![CDATA[
Use a list.<div class="codebox"><p>Code: </p><pre><code>set namenick {John johnny Peter pete Jack ripper "Firstname Lastname" theNick}foreach {name nick} $namenick {  output "$name has the nickname $nick"}</code></pre></div>The last entry is just to show you how to add names with spaces in them. Your string could be turned into a list like this by splitting it on "|" and ":" (set demo [split $namenick "|:"])<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Mar 17, 2004 4:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-03-17T11:57:04-04:00</updated>

		<published>2004-03-17T11:57:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34717#p34717</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34717#p34717"/>
		<title type="html"><![CDATA[Help with arrays and lists]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34717#p34717"><![CDATA[
Hello, im making a tcl script and need some help.<br>I want to create a variable(or array) like<br><br>set namenick "John|johnny:Peter|pete:Jack|ripper"<br><br>| is used to separate name from nick and : is used to separate different persons.<br>Now how can i output them like this:<br><br>John has the nickname is johnny<br>Peter has the nickname pete<br>..<br><br>Note: We do NOT know how many names/nicks in the variable is.<br>I used set array but it seemed slow and outputted them in a random order.<br><br>Thanks very much in advice!<p>Statistics: Posted by Guest — Wed Mar 17, 2004 11:57 am</p><hr />
]]></content>
	</entry>
	</feed>
