Block Comments in V2

  • Comments 4

Smith Catar was looking at my Tech Ed demos and noticed that I used block comments.  These are not in the CTP that you have so I guess I sorta let this one leak out.  Yes - V2 will have BLOCK COMMENTS!!!

Block comments start with "<# and end with "#>".  e.g.

This is
block comment

Happy happy. 
Block comments - you asked for them, you'll get them. 

Jeffrey Snover [MSFT]
Windows Management Partner Architect
Visit the Windows PowerShell Team blog at:
Visit the Windows PowerShell ScriptCenter at:

Leave a Comment
  • Please add 3 and 8 and type the answer here:
  • Post
  • Nice to hear! However the <# #> literals look quite ugly to me. Any comments on why you choose these literals and not e.g. /* */ like in c++, c# and other languages?


  • Oh...Microsoft will excute Stop-Leak cmdlet for you...

  • Thanks Jeffrey, good to have this feature coming!

  • Block comments good. Choice of delimiters? Hmmm.

    One of my favourite languages REBOL (hint, hint, prod) has many different datatypes. Okay, maybe far too many datatypes? ;->

    But, one of those data types is a tag!


    type? <html width="100">

    >> tag!

    in much the same way you can go:

    type? "My name as a string"

    >> string!

    This means you can use xml and html in your code without having to escape the entire text on quotes...

    ie write-host "<tag here="30">

    would become

    write-host  <tag here="30">

    Now I'd much rather see the angle brackets used for a nifty language features like this with respect to XML - than used for block comments..

    Cos then.. would return a list of three items...

    function web-page()



       "This is my $name"



    web-page | out-server


    Rob Lancaster

Page 1 of 1 (4 items)

Block Comments in V2