Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Bug in about_if documentATION

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 05-04-2007   #1 (permalink)
Joris van Lier
Guest


 

Bug in about_if documentATION

Just for fun i thought i'd read about_if, i guess most people skip this chapter, atleast i did.

The following shows the if statement syntax:
if (<test1>)
{<code_block1>}
[elseif (<test2)
{<code_block2>}]
[else
<code_block3>}]

Seems there's a bug in the syntax for else, it's missing an opening curly-brace

PS> if($true) {"yes"} else "no"}
Missing statement block after 'else' keyword.
At line:1 char:24
+ if($true) {"yes"} else " <<<< no"}

Anyone noticed and reported a bug on this?

--
Joris van Lier
Please note that all scripts are supplied "as is" and with no warranty
Blog: http://whizzrd.spaces.live.com


My System SpecsSystem Spec
Old 05-04-2007   #2 (permalink)
RichS
Guest


 

RE: Bug in about_if documentATION

Well spotted. I've looked at that a number of times and not noticed
--
Richard Siddaway
Please note that all scripts are supplied "as is" and with no warranty
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"Joris van Lier" wrote:

> Just for fun i thought i'd read about_if, i guess most people skip this chapter, atleast i did.
>
> The following shows the if statement syntax:
> if (<test1>)
> {<code_block1>}
> [elseif (<test2)
> {<code_block2>}]
> [else
> <code_block3>}]
>
> Seems there's a bug in the syntax for else, it's missing an opening curly-brace
>
> PS> if($true) {"yes"} else "no"}
> Missing statement block after 'else' keyword.
> At line:1 char:24
> + if($true) {"yes"} else " <<<< no"}
>
> Anyone noticed and reported a bug on this?
>
> --
> Joris van Lier
> Please note that all scripts are supplied "as is" and with no warranty
> Blog: http://whizzrd.spaces.live.com
>
>

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where Can I Get Documentation? HipHopHank PowerShell 4 02-14-2008 02:50 PM
Official SP1 Documentation romanom Vista General 0 02-05-2008 08:35 AM
WSH 5.7 documentation SWDWS Vista account administration 1 06-15-2007 05:26 PM
about_if examples muddled I think Andrew Watt [MVP] PowerShell 0 10-12-2006 02:55 PM
More documentation sources Joao Paulo Duque Vieira Avalon 2 05-10-2006 05:17 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51