User Program Communication

Commenting in Go

Commenting is used to write text within the code that is ignored by the compiler.


Syntax
//A single line comment
/ *
A block comment, spanning multiple lines
*/

Notes

Comments are used for documentation, code description, readability, etc.


Example
/*
Description: This program does not do anything, as
it is strictly used to demonstrate comments
*/
//Author: SyntaxCenter

Add to Slack

< User Input   |   Read from Text File >

© 2019 SyntaxDB. All Rights Reserved.