pxt-calliope/docs/reference/comment.md

39 lines
854 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# Comment
2016-04-02 01:22:47 +02:00
A note in code.
2016-03-26 00:47:20 +01:00
### @parent blocks/statement
A comment is a line of code that contains text, usually an explanation or a note. All comments are ignored during script execution.
### Block
Right click on any block and add a comment
### ~hint
To find out how to insert comments using the Blocks editor, see [the Blocks editor](/microbit/blocks/editor).
### ~
### Sample code with comments
![](/static/mb/blocks/comment-0.png)
### Commenting out code
During the debugging process, you may want to comment out a section of your code so that it doesn't run.
To comment out a block of code:
1. Right click on any block of code that you want to comment out.
1. Select add comment
When you want to uncomment your code, right click the on the comment, and then click delete block.
### See also
[Block editor](/microbit/blocks/editor)