MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mathematica commenting of code using (* *) can't be nested well.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84926] Re: [mg84914] Mathematica commenting of code using (* *) can't be nested well.
  • From: "Nasser Abbasi" <nma at 12000.org>
  • Date: Sun, 20 Jan 2008 03:31:46 -0500 (EST)
  • References: <200801191101.GAA18691@smc.vnet.net> <47921293.1000102@math.umass.edu>
  • Reply-to: "Nasser Abbasi" <nma at 12000.org>

----- Original Message ----- 
From: "Murray Eisenberg" <murray at math.umass.edu>


> Without a second right-end *) to match, I think this should obviously be 
> treated as a syntax error.
>

I think Mathematica is free to have its language rules of course, I was just 
commenting because that is NOT how other languages normally treats comments 
that has an opening and closing tokens.

Once a comment is started, everything in from of it is ignored until the 
comment is closed.

This works in C:       /*  comment   /*  still inside a commant   */
This work in C++:    //  comment   //  still inside a commant   //
This does NOT work in Mathematica  (*  comment  (*  still inside a comment 
*)

>
> -- 
> 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
>

Nasser 



  • Prev by Date: Re: Findfit in C++
  • Next by Date: Re: Tracing a Cycloid
  • Previous by thread: Re: Mathematica commenting of code using (* *) can't
  • Next by thread: Re: Re: Mathematica commenting of code using