microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
samples/language/Comments.qs
20lines · modecode
| 1 | /// # Sample |
| 2 | /// Comments |
| 3 | /// |
| 4 | /// # Description |
| 5 | /// Comments begin with two forward slashes (`//`) and continue until the |
| 6 | /// end of line. Comments may appear anywhere in the source code. |
| 7 | /// Q# does not currently support block comments. |
| 8 | /// Documentation comments, or doc comments, are denoted with three |
| 9 | /// forward slashes (`///`) instead of two. |
| 10 | namespace MyQuantumApp { |
| 11 | open Microsoft.Quantum.Diagnostics; |
| 12 | |
| 13 | /// This is a doc-comment for the `Main` operation. |
| 14 | @EntryPoint() |
| 15 | operation Main() : Result[] { |
| 16 | // Comments can go anywhere in a program, although they typically |
| 17 | // preface what they refer to. |
| 18 | return []; |
| 19 | } |
| 20 | } |