Skip to content

commenting lines (was [R] Drawing Trig Function)

1 message · Brian Ripley

#
There are a couple of conventions here.  C uses /* blah blah blah */,
but as I understand it // rest of line is preferred in C++.  Indeed,
there is some tendency for C++ programmers to find it convenient in C,
and gcc lets it be used.  Perl uses # rest of line and TeX (and Rd) %
rest of line, and Visual Basic ' rest of line and ...

With a good code editor none of these are any problem.  There is no
reason to write many lines of comments in R code: that's what the .Rd
file is for.  And if you want to temporarily delete a block, 
if(0) { ... } will work, as indeed will temporarily deleting in an editor.