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

	<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-04-16T13:12:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-04-16T13:12:20-04:00</updated>

		<published>2004-04-16T13:12:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35622#p35622</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35622#p35622"/>
		<title type="html"><![CDATA[parsing variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35622#p35622"><![CDATA[
ok sounds logic altho i don't competly get it <br><br>what about if u do <br><br>set var {<br>  %VAR% $variable<br>  %VAR2% $variable2<br>}<br><br>and use<br><br>foreach and import it<br><br><br>global var<br>foreach data [split [join [lrange $var 0 end]] \n] {<br>  set data [string map [list [lindex $data 0] [join [lrange $arg 1 end]]] $data]<br>}<br><br>for some reason that won't parse .. either ive tryed various ways tryed adding list in the before i split after i split .... and so on ive tryed list $var doesn't seem to be working either for some reason it won't parse.. i know its probably a logic reason but i don't understand why all i got from the manual was that that once u open it u should close it i know i know i haveing bit trouble with technical english langue .. sorry hehe<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Fri Apr 16, 2004 1:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-04-15T20:58:31-04:00</updated>

		<published>2004-04-15T20:58:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35598#p35598</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35598#p35598"/>
		<title type="html"><![CDATA[Re: parsing variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35598#p35598"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>[list %NAME% $var(name)]</code></pre></div> instead of <div class="codebox"><p>Code: </p><pre><code>{%NAME% $var(name)}</code></pre></div> Or instead of setting 'var(name)' you could make the element name the same as the text to be replaced by its value... 'var(%NAME%)' then use 'string map [array get var] ...' to do the mapping.<br><br><a href="http://tcl.tk/man/tcl8.5/TclCmd/Tcl.htm#M10" class="postlink">http://tcl.tk/man/tcl8.5/TclCmd/Tcl.htm#M10</a> - "No substitutions are performed on the characters between the braces except for backslash-newline substitutions"<br><a href="http://tcl.tk/man/tcl8.5/TclCmd/string.htm#M34" class="postlink">http://tcl.tk/man/tcl8.5/TclCmd/string.htm#M34</a> - "charMap is a <strong class="text-strong">list</strong> ..."<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Apr 15, 2004 8:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-04-15T20:01:05-04:00</updated>

		<published>2004-04-15T20:01:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35594#p35594</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35594#p35594"/>
		<title type="html"><![CDATA[parsing variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35594#p35594"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>return [join [lrange [string map {%NAME% $var(name)} $arg] 0 end]]</code></pre></div>how could i make the variable pars .. cause it shows the var name not the value of the var...<br><br>oh could make a difference its reading this from a html file then parses the variables like a template .. suggestions ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Thu Apr 15, 2004 8:01 pm</p><hr />
]]></content>
	</entry>
	</feed>
