<?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: Powershell function New-Array</title>
	<atom:link href="http://get-powershell.com/2008/02/07/powershell-function-new-array/feed/" rel="self" type="application/rss+xml" />
	<link>http://get-powershell.com/2008/02/07/powershell-function-new-array/</link>
	<description></description>
	<lastBuildDate>Tue, 07 Sep 2010 19:05:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: virgilio</title>
		<link>http://get-powershell.com/2008/02/07/powershell-function-new-array/comment-page-1/#comment-744</link>
		<dc:creator>virgilio</dc:creator>
		<pubDate>Thu, 06 Aug 2009 03:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://getpowershell.wordpress.com/2008/02/07/powershell-function-new-array/#comment-744</guid>
		<description>how can I create a bidimensional array and sort it by 1 dimension
    0        1
[1.23][123]
[3.56][356]
[2.56][256]
[1.00][100]

I want to sort by column 1so I can return column 0 in the right order
[1.00] 1.00.cs
[1.23]  1.23.cs
[2.56] 2.56.sql
[3.56]  3.56.sqc

The number are actually filenames with extension but some how they come in the wrong order because of the dots</description>
		<content:encoded><![CDATA[<p>how can I create a bidimensional array and sort it by 1 dimension<br />
    0        1<br />
[1.23][123]<br />
[3.56][356]<br />
[2.56][256]<br />
[1.00][100]</p>
<p>I want to sort by column 1so I can return column 0 in the right order<br />
[1.00] 1.00.cs<br />
[1.23]  1.23.cs<br />
[2.56] 2.56.sql<br />
[3.56]  3.56.sqc</p>
<p>The number are actually filenames with extension but some how they come in the wrong order because of the dots</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://get-powershell.com/2008/02/07/powershell-function-new-array/comment-page-1/#comment-562</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Sat, 28 Feb 2009 02:01:15 +0000</pubDate>
		<guid isPermaLink="false">http://getpowershell.wordpress.com/2008/02/07/powershell-function-new-array/#comment-562</guid>
		<description>I&#039;m having a similar difficulty: I want a function to ALWAYS return an array, even if there is one element.  However, it&#039;s ALWAYS converting the array to a scalar when it returns it, even if I add a comma before the variable being returned.  I even tried adding your new-array function to the return, and it&#039;s still not working:

PS &gt; function new-array {,$args}
PS &gt; $i = new-array 1
PS &gt; $i
1
PS &gt; $i.count
1
PS &gt; function a {$x=1; return new-array $x}
PS &gt; $x = a
PS &gt; $x
1
PS &gt; $x.count
PS &gt; 

Am I doing something wrong here?  I really, REALLY don&#039;t want to change every place I call this function to force the array -- I want to force the array in the function, so that calling it uses the same syntax as calling any other function.

Any ideas?

Thanks,
Ken</description>
		<content:encoded><![CDATA[<p>I&#8217;m having a similar difficulty: I want a function to ALWAYS return an array, even if there is one element.  However, it&#8217;s ALWAYS converting the array to a scalar when it returns it, even if I add a comma before the variable being returned.  I even tried adding your new-array function to the return, and it&#8217;s still not working:</p>
<p>PS &gt; function new-array {,$args}<br />
PS &gt; $i = new-array 1<br />
PS &gt; $i<br />
1<br />
PS &gt; $i.count<br />
1<br />
PS &gt; function a {$x=1; return new-array $x}<br />
PS &gt; $x = a<br />
PS &gt; $x<br />
1<br />
PS &gt; $x.count<br />
PS &gt; </p>
<p>Am I doing something wrong here?  I really, REALLY don&#8217;t want to change every place I call this function to force the array &#8212; I want to force the array in the function, so that calling it uses the same syntax as calling any other function.</p>
<p>Any ideas?</p>
<p>Thanks,<br />
Ken</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The 411 on Powershell Operators - Part 1 the -eq operator &#171; Get-Powershell</title>
		<link>http://get-powershell.com/2008/02/07/powershell-function-new-array/comment-page-1/#comment-12</link>
		<dc:creator>The 411 on Powershell Operators - Part 1 the -eq operator &#171; Get-Powershell</dc:creator>
		<pubDate>Wed, 13 Feb 2008 01:00:07 +0000</pubDate>
		<guid isPermaLink="false">http://getpowershell.wordpress.com/2008/02/07/powershell-function-new-array/#comment-12</guid>
		<description>[...] Powershell function&#160;New-Array  [...]</description>
		<content:encoded><![CDATA[<p>[...] Powershell function&nbsp;New-Array  [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
