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

	<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>2002-12-29T22:25:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-12-29T22:25:42-04:00</updated>

		<published>2002-12-29T22:25:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14685#p14685</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14685#p14685"/>
		<title type="html"><![CDATA[sizeof() for tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14685#p14685"><![CDATA[
Tcl provides "llength" and "string length" to obtain character and list lengths.<br><br>When it comes to strings, it's simple enough to say 3 characters are 3 bytes long (as Tcl doesn't use a null terminator, though it's memory will, this is upt o you to count for if you so wish).<br><br>When it comes to numbers in C/++, things are not the same.<br><br>To place things in basics (I am no expert, and I am going from memory). With numbers, 1 byte can hold the values 0 through to 255, and 2 bytes can hold 0 through 65535.<br><br>In reality, a 1 byte number, and a 1 byte character are the same things, as the character is selected from 1 of 256 possible values/characters.<br><br>What he is asking, is if you have the two values "hello" and "255", how do you get them memory usage values from these. "hello" would produce 5 (without any null terminator, again see above) and "255" would produce 1.<br><br>Anyway, to the actual question.<br><br>Esentialy, no.<br><br>"string length" will help you for characters (depending on your needs). As for numbers, it could be possible to use some math against the values, to generate a sizeof value.<br><br>The "string is" commands could help you determine the type of variable, which would allow for a multi-purpose single command for the job.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Dec 29, 2002 10:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Zsac]]></name></author>
		<updated>2002-12-29T22:04:44-04:00</updated>

		<published>2002-12-29T22:04:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14683#p14683</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14683#p14683"/>
		<title type="html"><![CDATA[sizeof() for tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14683#p14683"><![CDATA[
thats the length of the list. maybe i wasn't clear, i want the actual size as in bits, bytes etc etc.<br><br>thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2209">Zsac</a> — Sun Dec 29, 2002 10:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-12-29T21:57:49-04:00</updated>

		<published>2002-12-29T21:57:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14682#p14682</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14682#p14682"/>
		<title type="html"><![CDATA[Re: sizeof() for tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14682#p14682"><![CDATA[
Hello, you can try to use:<br><blockquote class="uncited"><div>set var [llength $string]</div></blockquote><p>Statistics: Posted by Guest — Sun Dec 29, 2002 9:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Zsac]]></name></author>
		<updated>2002-12-29T19:39:47-04:00</updated>

		<published>2002-12-29T19:39:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14678#p14678</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14678#p14678"/>
		<title type="html"><![CDATA[sizeof() for tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14678#p14678"><![CDATA[
is there an equivalent command to sizeof() for c++ in tcl? i would like to grab the size of a variable but i can't find any commands that seam to be of use.<br><br>thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2209">Zsac</a> — Sun Dec 29, 2002 7:39 pm</p><hr />
]]></content>
	</entry>
	</feed>
