DDoc and single declarations

Carlos Santander csantander619 at gmail.com
Sat Jun 10 09:42:42 PDT 2006


jicman escribió:
> Greetings!
> 
> According to DDoc documentation, a declaration can have a comment to the right
> of the declaration, ie.
> 
> int i = 0;   /// this is for i
> 
> and the comment will appear in the DDoc html created document.  But, somehow,
> this is not working for me.  Maybe I am missing something.  Here is the program,
> 
> private import test.MyDDoc;   /// This is to bring PrintMe()
> 
> /// This is a comment for PrintMe2()
> void PrintMe2()
> {
> printf("test it");
> }
> /// This one is a comment for main
> void main()
> {
> int i = 0;   /// This is a comment for i
> PrintMe();   /// This came from test.MyDDoc
> PrintMe2();  /// <b>This is a local PrintMe2()</b>
> }
> 
> The only comments appearing in the HTML file created by DDoc are,
> 
> /// This is a comment for PrintMe2()
> 
> and 
> 
> /// This one is a comment for main
> 
> the rest are not appearing.  Anyone want to explain why to me?
> 
> Thanks.
> 
> josé
> 
> PS:  Here is test.MyDDoc if someone wants to take a stab at it:
> 
> /**
> + this is a module for something
> + <br><b>line 2</b>
> + <br>line 3
> */
> module test.MyDDoc;
> /// This function prints hello
> void PrintMe()
> {
> char[] Chh = "This is good";   /// This is for Chh
> int i      = 3;                /// This is for i
> printf("hello\n");             /// Prints hello
> }
> 
> By the way, these last 3 comments also do not appear in the DDoc file.
> 
> 

I don't think comments inside functions are processed by Ddoc. In fact, I don't 
remember ever seeing a doc utility that does that.

-- 
Carlos Santander Bernal



More information about the Digitalmars-d-learn mailing list