Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Wouldn't it be nice if Matlab supported C-style comments?
Replies: 8   Last Post: Mar 12, 2013 6:46 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,231
Registered: 6/7/07
Re: Wouldn't it be nice if Matlab supported C-style comments?
Posted: Mar 10, 2013 1:27 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 3/10/2013 12:04 PM, Paul wrote:
> 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.


OTOH, you have to close the opening comment character or it keeps on
going..."there is no free lunch"

> 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

...

Well, no, you only need duplicate the line which contains the snippet
you're trying to experiment is at least one alternative.

--




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.