<?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: Solving ActionScript Puzzlers in PowerShell</title>
	<atom:link href="http://www.dougfinke.com/blog/index.php/2010/01/20/solving-actionscript-puzzlers-in-powershell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dougfinke.com/blog/index.php/2010/01/20/solving-actionscript-puzzlers-in-powershell/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=solving-actionscript-puzzlers-in-powershell</link>
	<description>Researching the optimal; implementing the practical</description>
	<lastBuildDate>Tue, 07 Sep 2010 16:08:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Paul Chavez</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/01/20/solving-actionscript-puzzlers-in-powershell/comment-page-1/#comment-56513</link>
		<dc:creator>Paul Chavez</dc:creator>
		<pubDate>Fri, 22 Jan 2010 17:17:33 +0000</pubDate>
		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/01/20/solving-actionscript-puzzlers-in-powershell/#comment-56513</guid>
		<description>I see, in your example you don&#039;t have an else statement when checking for existence of $caps. Since I have the else something gets added to $result in any case.</description>
		<content:encoded><![CDATA[<p>I see, in your example you don&#8217;t have an else statement when checking for existence of $caps. Since I have the else something gets added to $result in any case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Finke</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/01/20/solving-actionscript-puzzlers-in-powershell/comment-page-1/#comment-56509</link>
		<dc:creator>Doug Finke</dc:creator>
		<pubDate>Thu, 21 Jan 2010 22:06:57 +0000</pubDate>
		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/01/20/solving-actionscript-puzzlers-in-powershell/#comment-56509</guid>
		<description>I believe the second time thru when searching for $name and the value is not found, $f is -eq $null. This gets appended to your $result array, causing the count ot be 2.

You can check it like this: $result[1] -eq $null</description>
		<content:encoded><![CDATA[<p>I believe the second time thru when searching for $name and the value is not found, $f is -eq $null. This gets appended to your $result array, causing the count ot be 2.</p>
<p>You can check it like this: $result[1] -eq $null</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Chavez</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/01/20/solving-actionscript-puzzlers-in-powershell/comment-page-1/#comment-56506</link>
		<dc:creator>Paul Chavez</dc:creator>
		<pubDate>Thu, 21 Jan 2010 17:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/01/20/solving-actionscript-puzzlers-in-powershell/#comment-56506</guid>
		<description>This looked suspiciously like a quick &#039;zip&#039; function I wrote last night so I tried to see if the issue applied to my logic. It doesn&#039;t act exactly the same but is still odd. Here is a sample:
-------
function loopy2
{

$names = &quot;abc&quot;,&quot;def&quot;
$names2 = &quot;def&quot;,&quot;ghi&quot;
$result = @()
$names2 &#124; ForEach-Object {
$name = $_
$f = $names &#124; ?{ $_ -eq $name }

if ($f) { $result += $f.ToUpper() }
else { $result += $f }
}
$result.count
}
-------
I output the count property of the array because if it worked correctly you&#039;d expect one item in the array, but really there ends up being two. However the second value is empty string or $null or something, not &quot;def&quot; as you might expect from the puzzle results.</description>
		<content:encoded><![CDATA[<p>This looked suspiciously like a quick &#8216;zip&#8217; function I wrote last night so I tried to see if the issue applied to my logic. It doesn&#8217;t act exactly the same but is still odd. Here is a sample:<br />
&#8212;&#8212;-<br />
function loopy2<br />
{</p>
<p>$names = &#8220;abc&#8221;,&#8221;def&#8221;<br />
$names2 = &#8220;def&#8221;,&#8221;ghi&#8221;<br />
$result = @()<br />
$names2 | ForEach-Object {<br />
$name = $_<br />
$f = $names | ?{ $_ -eq $name }</p>
<p>if ($f) { $result += $f.ToUpper() }<br />
else { $result += $f }<br />
}<br />
$result.count<br />
}<br />
&#8212;&#8212;-<br />
I output the count property of the array because if it worked correctly you&#8217;d expect one item in the array, but really there ends up being two. However the second value is empty string or $null or something, not &#8220;def&#8221; as you might expect from the puzzle results.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
