Errata

Windows Powershell Pocket Reference

Errata for Windows Powershell Pocket Reference

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 50
examples output in the "break" and "continue" sections

The example output is not correct it shows the output when _not_ using the ":outer" break target label in both cases.

What seems to be the cause is that whilst the loop label correctly is specified using a preceding colon, the reference to it should not use the colon[1]. The example code is:

:outer for (...
for (...
if (...
break :outer // note colon!
}}}

It should be:

:outer for (...
for (...
if (...
break outer // Note NO colon here
}}}

Running those two shows different behaviour.

(Why doesn't PowerShell complain "unknown label"? Presumably labels were added to the language to make sure the correct loop/switch was exited, but a simple typo will negate that protection).


[1] http://technet.microsoft.com/en-us/library/dd315285.aspx

Alan McFarlane  Jun 12, 2009 
Printed Page 55
table, last row

This table lists short form names for .NET types e.g.
[Xml] [System.Xml.XmlDocument]

The last row is:
[TypeName] [System.TypeName]

There is no .NET class called "System.TypeName", so should bother instances of 'TypeName' be marked as Constant Width Italic per page x, "text that should be replaced with [...] values determined by context." i.e. here TypeName can be replaced by Int32, Int16, or Version etc.

Alan McFarlane  Jun 12, 2009 
Printed Page 60
last sentence

Sentence is: "If [...], you may omit [...] and invoke the operator"

The "Invoke operator" is being discussed in this section. So has the editor 'fixed' (reordered) the last three words?

I think the sentence should say: "... and the invoke operator."

Alan McFarlane  Jun 12, 2009 
129
4th format specifier in Table 9-1 - Fixed point notation

The Fixed point notation example uses the Exponential format specifier (E3 instead of F3).
From:
PS >"{0: F3}" ?f [Math]::Pi
3.142
To:
PS >"{0: E3}" ?f [Math]::Pi
3.142

Tim Gilbert  Nov 13, 2009