Look up comment, commenting, comments, or commentary in Wiktionary, the free dictionary. |
Comment may refer to:
From a # character to the end of the line. From a - sequence to the end of the line. In MySQL, the - (double-dash) comment style requires the second dash to be followed by at least one whitespace or control character (such as a space, tab, newline, and so on). This syntax differs slightly from standard SQL comment syntax, as discussed in Section 1.7.2.4, “'-' as the Start of a Comment”. What does comment mean? To comment is to make a statement, remark or express an opinion. (verb) An example of comment. YouTube Random Comment Picker is a simple and free to use online tool to easily pick a winner for YouTube giveaways, sweepstakes, promotions, contests or lotteries. By entering the URL of the YouTube video we retrieving all comments where we filtering out duplicate names from comments, based on your filter duplicate option. Comments allow your website’s visitors to have a discussion with you and each other. When you activate comments on a Page or post, WordPress inserts several text boxes after your content where users can submit their comments. Once you approve a comment, it appears underneath your content. What does comment mean? To comment is to make a statement, remark or express an opinion. (verb) An example of comment.
- Comment (linguistics) or rheme, that which is said about the topic (theme) of a sentence
- Bernard Comment (born 1960), Swiss writer and publisher
Computing[edit]
- Comment (computer programming), explanatory text or information embedded in the source code of a computer program
- Comment programming, a software development technique based on the regular use of comment tags
Law[edit]
- Public comment, a term used by various U.S. government agencies, referring to comments invited regarding a report or proposal
- Short scholarly papers written by members of a law review
- Comments on proposed rules under the rulemaking process in United States administrative law
Media and entertainment[edit]
- Comment (1958 TV series), an Australian television series
- Comment (album), a 1970 album by Les McCann
- 'Comment', a 1969 song by Charles Wright & the Watts 103rd Street Rhythm Band
- Comment, a quarterly journal published by Cardus
- Comment section, a user-generated content feature of Web content allowing readers to publish comments
See also[edit]
- Request for Comments, an Internet Engineering Task Force (IETF) memorandum on Internet systems and standards
- Annotation, an explanation included with other data
- Footnote, a note at the bottom of a page
- Obiter dictum, a remark or observation made by a judge that does not form a necessary part of the court's decision
In PowerShell single line comments start with a hash symbol, everything to the right of the # will be ignored.
# comment
In PowerShell 2.0 and above multi-line block comments can be used:
Comment
<# comment
contines #>
Multi-line comments are typically used to add descriptive help at the start of a script, but also work to embed comment text within a command.
Comment-based Help was also added in PS 2.0, this allows the addition of some standardised tags to a scripts comments which allow the Script to interact with Get-Help.
See this template script, or read Help about_Comment_Based_Help for a full list of .Keywords.
Examples
Copy-Item demo.msi C:installdemo.msi #copy the installer
By using embedded comments you can document the arguments for a cmdlet:
Comment based help
Comment-based help topics can be added to functions and scripts. This is done using special help comment keywords that start with a period. Examples of these are below, you can add as many or as few of these to your script as needed to provide the relevant level of detailed help.
To display this help text, use Get-Help
e.g.
get-help ./script.ps1
get-help myfunction (this will only work once the function has been loaded/Dot sourced)
Where to add the Comment-based help:
Comment-based help for a script must appear at the beginning of the script (it can also be placed at the end of the script file but only if the script is not signed.)
Comment-based help for a function can appear in one of three locations:
- At the beginning of the function body.
- At the end of the function body.
- Before the Function keyword. There cannot be more than one blank line between the last line of the function help and the Function keyword.
Most people put all comments at the beginning of the script/function.
Comment In Html
Default Help
If you call get-help for a script that does not have any comment based help but does have parameters defined with a PARAM ( ) statement, then get-help will return those parameter details.
It is also possible to get a slightly more verbose set of default help text by including just <# .SYNOPSIS #> at the top of the script.
See Help about_Comment_Based_Help for more.
Copy and Paste
Because PowerShell supports Tab Completion you need to be careful about copying and pasting Space + TAB characters (particularly just before the # comment delimiter).
Example:
Function demo() {
} # comment
Commentary Definition
^ That line is }<space><tab> #
when copied/pasted onto the PowerShell command line, this happens:
PS C:batch> Function demo() {
>> } .aaardvaark.cmd# comment
>>
The term '.aaardvaark.cmd#' is not recognized as the name of a cmdlet, function, script file...
What is happening is that the space-tab gets expanded to match the first file in the current directory, in this case aaardvaark.cmd. If the sequence had been <space><tab><space> and the first file had been a PowerShell script or an executable then it would actually be run.
If the white space consists of nothing but <space> characters (or nothing but <tab> characters) then this will never occur.
#Now stand in the place where you work, Now face West
Think about the place where you live, Wonder why you haven't before# - REM 'Stand'
Related PowerShell Cmdlets:
Escape characters - double to escape them
Some rights reserved