Documentation and Comments
Documenting and Comments
# Do not write:
# Increment Margin by 2
$Margin = $Margin + 2
# Maybe write:
# The rendering box obscures a couple of pixels.
$Margin = $Margin + 2# Requiring a space makes things legible and prevents confusion.
# Writing comments one-per line makes them stand out more in the console.
<#
.SYNOPSIS
Really long comment blocks are tedious to keep commented in single-line mode.
.DESCRIPTION
Particularly when the comment must be frequently edited,
as with the help and documentation for a function or script.
#>DOC-01 Write comment-based help
Last updated
Was this helpful?