Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
Paul
Posts:
208
Registered:
2/23/10
|
|
Wouldn't it be nice if Matlab supported C-style comments?
Posted:
Mar 10, 2013 1:04 PM
|
|
C-style comments are great! You don't have to comment everything to the right of the comment character. You can comment out a snippet of code in the middle of a line, and keep the rest of the code to the right of it.
I (and I suspect others) spread complex statements and expressions over several lines, using deeper levels of indentation as cognitive cues to show which parts of the code bind together more tightly due to higher precedence. You can't comment out a snippet of code in middle of those lines. If you want to experimentally try a number of variations of the code, you have to duplicate the whole chunk of code and comment out the original copy before messing around with the duplicate. So much code just to try a few variations. This can make it difficult to follow the rest of the source file.
|
|
|
|