Jump to content

Use of Document Comments? The ///

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
28 replies to this topic

#1
Panarchy

Panarchy

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 258 posts
Hi

Was reading Sams Teach Yourself C++ in One Hour a Day, when I came across the following 'note';

Quote

NOTE

A third style of comment is supported by some C++ compilers. These comments are referred to as document comments and are indicated using three forward slashes (///). The compilers that support this style of comment allow you to generate documentation about the program from these comments. Because these are not currently a part of the C++ standard, they are not covered here.

This book is very recent (Copyright 2009, First Printing July 2008).

So I now I have two questions about this;

  • This 3rd style of commenting, which C++ compilers support it?
  • Is there talk of making this part of the C++ standard, and if so, please give me a link!
  • Is Document Comments the official name for this?

Please answer my questions.

Thanks in advance,

Panarchy

#2
dcs

dcs

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 775 posts
I don't know about compilers that support such, but I tend to use Javadoc comments because my IDE does -- although I'm hoping they add doxygen as well.

Comparison of documentation generators - Wikipedia, the free encyclopedia

#3
Panarchy

Panarchy

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 258 posts
Okay.

What IDE do you use?

#4
dcs

dcs

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 775 posts
I use SlickEdit.

#5
Panarchy

Panarchy

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 258 posts
Ah, Okay!

#6
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
/// adds the line of code to an XML file, which allows you to build documentation.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#7
Panarchy

Panarchy

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 258 posts
And when will the /// be built into C++?

(see 1st post)

#8
dcs

dcs

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 775 posts
Comments are not built into code.

#9
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
I think he meant "when will the /// be implemented into the C++ syntax".
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#10
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
// makes everything that follows a comment, including the third /. Producing documentation is a compiler feature, not a language feature.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#11
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
When the compiler reads a /// line, it puts the comments into an XML file, to be used as documentation.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#12
Panarchy

Panarchy

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 258 posts
Okay