MathGroup Archive 2004

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

Search the Archive

Re: (**) comments highlighted - newbie

  • To: mathgroup at
  • Subject: [mg48792] Re: (**) comments highlighted - newbie
  • From: Paul Abbott <paul at>
  • Date: Wed, 16 Jun 2004 07:48:54 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <cagibh$i8u$> <cajj95$eno$>
  • Sender: owner-wri-mathgroup at

In article <cajj95$eno$1 at>,
 AES/newspost <siegman at> wrote:

> While we're on this topic, it would also be nice if one could Merge a 
> sequence of Input and text or header cells, starting with an Input cell, 
> and have all the non-Input cells be auto-converted to comment lines.
> I like to develop and test longish routines by coding them as one Input 
> cell per statement so I can step down through the routine one cell at a 
> time, together with occasional comment cells in header or text format 
> interspersed between these input cells to remind me of what I'm doing.
> (*--I guess I could put the (* *) labels on the comment cells from the 
> start -- but why not let Mathematica do the work?--*)

I think that it is preferable to develop packages as Notebooks, in which 
the documentation can be both extensive and nicely formatted, and use 
the autogeneration feature to automatically generate the Mathematica 
package. This allows you t break your code into understandable chunks, 
making your code easier to maintain, test, and understand. Modifying the 
Notebook StyleSheet allows you to write comments in any format that you 

For a nice example, see the Notebook


which (automatically) generates the Notation.m package (loaded as 
<<Utilities`Notation`), and is included with the standard distribution 
in the following directory:

  ToFileName[{$TopDirectory, "AddOns", "ExtraPackages","Utilities",    


Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at 

  • Prev by Date: Re: Complexes, Reals, FullSimplify
  • Next by Date: Re: Using NDSolve in NonlinearFit
  • Previous by thread: Re: Re: (**) comments highlighted
  • Next by thread: Creating combinations from a group of sets, PART 2