Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changes between Version 3 and Version 4 of NestedCommentsExample

Show
Ignore:
Author:
jcc7 (IP: 68.97.93.182)
Timestamp:
11/18/06 22:37:45 (15 years ago)
Comment:

more info

Legend:

Unmodified
Added
Removed
Modified
  • NestedCommentsExample

    v3 v4  
    4444}}} 
    4545 
     46== Types of Comments in the D Programming Language == 
     47 
     48There are three different kinds of comments in D. 
     49 
     50(1) '''Single-line comments''' (//):  
     51 These comments can start anywhere except in the middle of a token and continue until the end of the line. 
     52(2) '''Regular multi-line comments''' (/* */):  
     53 These comments can occur anywhere except within a token or another regular multi-line comments. 
     54(3) '''Nesting multi-line comments''' (/+ +/):  
     55 These comments can occur anywhere except within a token. Whenever the compiler sees an initial marker (/+), it goes into "nesting comments" mode. At this point, the compiler is only looking for two things another initial marker to indicate a deeper nested comment or a terminal marker (+/) to close a nesting level. The compiler ignores other symbols within nested comments including quotes(""), multi-line comments (/* */), and single-line comments (//). 
     56 
     57 
     58 
    4659== Source == 
    4760