up previous next
End-of-line comments in CoCoA start with either
-- or
//; all text up to the end of the line is considered comment.
CoCoA also allows embedded comments; these begin with the symbol
/* and end with the symbol
*/. CoCoA ignores the
contents of a comment, and treats it as if it were just a space.
/**/ // This is an end-of-line comment
/**/ Print 1+1; -- a command followed by an end-of-comment
2
/**/ A := [1 /*x-coord*/, 2 /*y-coord*/ ]; --> embedded comments
|
Writing multi-line comment inside
/* and
*/
is
strongly discouraged (even though allowed).