Drawing battleships with PowerShell block and multi line comment literals

by Klaus Graefensteiner 1. December 2010 22:20

The literals used for PowerShell block and multi-line comments are difficult to remember. Googling for multi-line comment doesn’t return the right results and only after I remembered to search for block comments was I successful.

Now its time to take care of it once and for ever by making the literals searchable (this blog post) and unforgettable using the battleship mnemonic device.


Figure 1: PowerShell multi line comments are firing

The following code snippet shows multi-line aka block comments in action.

<# Battle Ship #>

block / multi-line

# One line comment

<# Battle Ship #>

That's it. No more guessing!

Tags: , , , ,

PowerShell | Tips & Tricks | How To

About Klaus Graefensteiner

I like the programming of machines.

Add to Google Reader or Homepage

LinkedIn FacebookTwitter View Klaus Graefensteiner's profile on Technorati
Klaus Graefensteiner

Klaus Graefensteiner
works as Developer In Test and is founder of the PowerShell Unit Testing Framework PSUnit. More...

Open Source Projects

PSUnit is a Unit Testing framwork for PowerShell. It is designed for simplicity and hosted by Codeplex.
BlogShell is The tool for lazy developers who like to automate the composition of blog content during the writing of a blog post. It is hosted by CodePlex.



Powered by:

Creative Commons License

© Copyright 2015, Klaus Graefensteiner.

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Theme design:
This blog theme was designed and is copyrighted 2015 by Klaus Graefensteiner

Page rendered at 5/29/2015 12:54:33 AM (PST Pacific Standard Time UTC DST -7)