<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: if ( anObject ) then do stuff	</title>
	<atom:link href="https://jessewarden.com/2003/05/if-anobject-then-do-stuff.html/feed" rel="self" type="application/rss+xml" />
	<link>https://jessewarden.com/2003/05/if-anobject-then-do-stuff.html</link>
	<description>Software &#124; Fitness &#124; Gaming</description>
	<lastBuildDate>Thu, 29 May 2003 20:49:37 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: JesterXL		</title>
		<link>https://jessewarden.com/2003/05/if-anobject-then-do-stuff.html/comment-page-1#comment-450</link>

		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Thu, 29 May 2003 20:49:37 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=154#comment-450</guid>

					<description><![CDATA[Son of a...
]]></description>
			<content:encoded><![CDATA[<p>Son of a&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Phillip Kerman		</title>
		<link>https://jessewarden.com/2003/05/if-anobject-then-do-stuff.html/comment-page-1#comment-449</link>

		<dc:creator><![CDATA[Phillip Kerman]]></dc:creator>
		<pubDate>Thu, 29 May 2003 20:48:52 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=154#comment-449</guid>

					<description><![CDATA[it=!it is different than my toggle which went between 1 and 2.

Phillip]]></description>
			<content:encoded><![CDATA[<p>it=!it is different than my toggle which went between 1 and 2.</p>
<p>Phillip</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: JesterXL		</title>
		<link>https://jessewarden.com/2003/05/if-anobject-then-do-stuff.html/comment-page-1#comment-448</link>

		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Thu, 29 May 2003 16:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=154#comment-448</guid>

					<description><![CDATA[Actually Phillip, I did this, taken from my Director daze:
&#060;pre&#062;toggle = !toggle&#060;/pre&#062;
Since you could say &quot;not&quot; in Director, you just replace that with a bizz-ang symbol.]]></description>
			<content:encoded><![CDATA[<p>Actually Phillip, I did this, taken from my Director daze:<br />
&lt;pre&gt;toggle = !toggle&lt;/pre&gt;<br />
Since you could say &#8220;not&#8221; in Director, you just replace that with a bizz-ang symbol.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: michaud		</title>
		<link>https://jessewarden.com/2003/05/if-anobject-then-do-stuff.html/comment-page-1#comment-447</link>

		<dc:creator><![CDATA[michaud]]></dc:creator>
		<pubDate>Thu, 29 May 2003 16:16:58 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=154#comment-447</guid>

					<description><![CDATA[Be carefull what you ask for...
if you make it an object ... it&#039;s an object

there&#039;s also something as a &quot;bare&quot; type as in boolean

foo = true;
fooObj = new Boolean(true);

trace(foo);
//true
trace(fooObj);
//true

trace(&quot;typeof foo:&quot; + typeof foo);
//boolean
trace(&quot;foo.valueOf():&quot; + foo.valueOf());
//fooObj.valueOf():true
trace(&quot;foo.toString():&quot; + foo.toString());
//foo.toString():true

trace(&quot;typeof fooObj:&quot; + typeof fooObj);
//object

trace(&quot;fooObj.valueOf():&quot; + fooObj.valueOf());
//fooObj.valueOf():true
trace(&quot;fooObj.toString():&quot; + fooObj.toString());
//fooObj.toString():true


foo = false;
trace(&quot;if(foo)&quot;);
if(foo)
{
	trace(&quot;foo:&quot; + foo)
} else {
	trace(&quot;FooFalse:&quot; + foo)
}
//FooFalse:false

fooObj = new Boolean(false);

trace(&quot;if(fooObj)&quot;);
if(fooObj)
{
	trace(&quot;fooObj:&quot; + fooObj)
} else {
	trace(&quot;fooObjFalse:&quot; + fooObj)
}
//fooObj:false

trace(&quot;if(fooObj.valueOf())&quot;);
if(fooObj.valueOf())
{
	trace(&quot;fooObj:&quot; + fooObj)
} else {
	trace(&quot;fooObjFalse:&quot; + fooObj)
}
//fooObjFalse:false]]></description>
			<content:encoded><![CDATA[<p>Be carefull what you ask for&#8230;<br />
if you make it an object &#8230; it&#8217;s an object</p>
<p>there&#8217;s also something as a &#8220;bare&#8221; type as in boolean</p>
<p>foo = true;<br />
fooObj = new Boolean(true);</p>
<p>trace(foo);<br />
//true<br />
trace(fooObj);<br />
//true</p>
<p>trace(&#8220;typeof foo:&#8221; + typeof foo);<br />
//boolean<br />
trace(&#8220;foo.valueOf():&#8221; + foo.valueOf());<br />
//fooObj.valueOf():true<br />
trace(&#8220;foo.toString():&#8221; + foo.toString());<br />
//foo.toString():true</p>
<p>trace(&#8220;typeof fooObj:&#8221; + typeof fooObj);<br />
//object</p>
<p>trace(&#8220;fooObj.valueOf():&#8221; + fooObj.valueOf());<br />
//fooObj.valueOf():true<br />
trace(&#8220;fooObj.toString():&#8221; + fooObj.toString());<br />
//fooObj.toString():true</p>
<p>foo = false;<br />
trace(&#8220;if(foo)&#8221;);<br />
if(foo)<br />
{<br />
	trace(&#8220;foo:&#8221; + foo)<br />
} else {<br />
	trace(&#8220;FooFalse:&#8221; + foo)<br />
}<br />
//FooFalse:false</p>
<p>fooObj = new Boolean(false);</p>
<p>trace(&#8220;if(fooObj)&#8221;);<br />
if(fooObj)<br />
{<br />
	trace(&#8220;fooObj:&#8221; + fooObj)<br />
} else {<br />
	trace(&#8220;fooObjFalse:&#8221; + fooObj)<br />
}<br />
//fooObj:false</p>
<p>trace(&#8220;if(fooObj.valueOf())&#8221;);<br />
if(fooObj.valueOf())<br />
{<br />
	trace(&#8220;fooObj:&#8221; + fooObj)<br />
} else {<br />
	trace(&#8220;fooObjFalse:&#8221; + fooObj)<br />
}<br />
//fooObjFalse:false</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Phillip Kerman		</title>
		<link>https://jessewarden.com/2003/05/if-anobject-then-do-stuff.html/comment-page-1#comment-446</link>

		<dc:creator><![CDATA[Phillip Kerman]]></dc:creator>
		<pubDate>Thu, 29 May 2003 09:17:54 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=154#comment-446</guid>

					<description><![CDATA[That&#039;s funny because when teaching I always show ==true because I think people understand it easier (even though I have to explain double-equals).  Anyway, this isn&#039;t 100% new to me, but I still may revert to being clearer when programming.

The thing is, if you&#039;re the one who created and populated the variable... if you know that it&#039;ll be true or false (not new Boolean() or whatever), then I don&#039;t think it would matter practically.  

Here&#039;s another sort of thing I use all the time--probably some reason I shouldn&#039;t:
toggle=1;
toggle=1+(toggle==1);

That simply makes toggle go from 1 to 2 and back.

Basically, when used in an mathematical expression, true evaluates as 1 and false as 0.

Am I a bad boy?  (Not &quot;bad boy&quot; like you say down in Atlanta... but bad boy, like not good.)

Phillip]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s funny because when teaching I always show ==true because I think people understand it easier (even though I have to explain double-equals).  Anyway, this isn&#8217;t 100% new to me, but I still may revert to being clearer when programming.</p>
<p>The thing is, if you&#8217;re the one who created and populated the variable&#8230; if you know that it&#8217;ll be true or false (not new Boolean() or whatever), then I don&#8217;t think it would matter practically.  </p>
<p>Here&#8217;s another sort of thing I use all the time&#8211;probably some reason I shouldn&#8217;t:<br />
toggle=1;<br />
toggle=1+(toggle==1);</p>
<p>That simply makes toggle go from 1 to 2 and back.</p>
<p>Basically, when used in an mathematical expression, true evaluates as 1 and false as 0.</p>
<p>Am I a bad boy?  (Not &#8220;bad boy&#8221; like you say down in Atlanta&#8230; but bad boy, like not good.)</p>
<p>Phillip</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
