aboutsummaryrefslogtreecommitdiffstats
path: root/source/arduino/comments.rst
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@mit.edu>2010-11-21 01:40:37 -0500
committerMarti Bolivar <mbolivar@mit.edu>2010-11-21 01:40:37 -0500
commitc770a7f14404822c1164a2399079411a37808cfd (patch)
tree599188be6e3a5d105f9b8c4baba19d280b3d1058 /source/arduino/comments.rst
parent4b60b1cad5fe16895179d0bd8a5dc1e6e4c7564c (diff)
downloadlibrambutan-c770a7f14404822c1164a2399079411a37808cfd.tar.gz
librambutan-c770a7f14404822c1164a2399079411a37808cfd.zip
updated serial bootloader spec; other improvements
Diffstat (limited to 'source/arduino/comments.rst')
-rw-r--r--source/arduino/comments.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/arduino/comments.rst b/source/arduino/comments.rst
index e46fc48..b50aa0f 100644
--- a/source/arduino/comments.rst
+++ b/source/arduino/comments.rst
@@ -14,19 +14,23 @@ One use for comments is to help you understand (or remember) how your
program works, or to inform others how your program works. There are
two different ways of making comments.
+.. _arduino-comments-singleline:
+
**Single line comment**: Anything following two slashes, ``//``, until
the end of the line, is a comment::
x = 5; // the rest of this line is a comment
+.. _arduino-comments-multiline:
+
**Multi-line comment**: Anything in between a pair of ``/*`` and ``*/``
is a comment::
-
+
/* <-- a slash-star begins a multi-line comment
all of this in the multi-line comment - you can use it to comment
out whole blocks of code
-
+
if (gwb == 0){ // single line comment is OK inside a multi-line comment
x = 3;
}
@@ -60,4 +64,4 @@ is cryptic or unhelpful.
-.. include:: cc-attribution.txt \ No newline at end of file
+.. include:: cc-attribution.txt