Re: Re: Mathematica commenting of code using (* *)
- To: mathgroup at smc.vnet.net
- Subject: [mg84985] Re: [mg84951] Re: Mathematica commenting of code using (* *)
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Tue, 22 Jan 2008 01:49:54 -0500 (EST)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <fmsljm$knj$1@smc.vnet.net> <200801210906.EAA09435@smc.vnet.net>
- Reply-to: murray at math.umass.edu
That would break existing Mathematica syntax that requires matching delimiters. There are lots of possibly "convenient" exceptions that one could try to justify but that destroy the design coherence of the language. Martin Johansson wrote: > Nasser Abbasi wrote: >> Mathematica 6.0.1 >> >> I do not understand why the following can't be taken as a valid comment >> >> (* comment here (* more comments *) >> >> It seems to me that once the first (* is seen by the parser then it should >> take everything in front of it, all the way until it sees the closing *) as >> one comment. >> >> But in the above it does not. The (* in the middle breaks this, which does >> not make too much sense to me. What do you think? > > I think it would be useful (at least for me, the way I work when coding > and debugging) if it worked the way you expected(?). I often have a line > like > > something = somethingElse; (* with a comment *) > > that I want to "comment out" while testing my code by merely adding (* > at the beginning of the line. But maybe there are issues with this type > of parsing that more competent programmers can point out. > > //Martin > -- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
- References:
- Re: Mathematica commenting of code using (* *) can't be nested
- From: Martin Johansson <martin.n.johansson_LookMa_NoSpam_@ericsson.com>
- Re: Mathematica commenting of code using (* *) can't be nested