[#BloombergLP-balxml-Formatter-addComment] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Formatter.adoc[Formatter]::addComment :relfileprefix: ../../../ :mrdocs: Write the specified `comment` into the stream. == Synopsis Declared in `<balxml_formatter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void addComment( std::string_view const& comment, bool forceNewline = true); ---- == Description The optionally specified `forceNewline`, if true, forces to start a new line solely for the comment if it's not on a new line already. Otherwise, comments continue on current line. If an element‐opening tag is not completed with a `>`, `addComment` will add `>`. DEPRECATED: Use `addValidComment` instead. == Parameters [cols="1,4"] |=== | Name| Description | *comment* | text of the comment to write | *forceNewline* | whether to force the comment onto a new line |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#