[ESS] ESS sas-mode: change comment style

Ross Boylan ross at biostat.ucsf.edu
Mon Nov 5 19:30:30 CET 2007


On Mon, 2007-11-05 at 09:37 -0600, Rodney Sparapani wrote:
> Will wrote:
> > Hi,
> > 
> > I'd like to change the sas comment style from
> > ** ***************** **;
> > ** This is a comment **;
> > ** ***************** **;
> > to
> > /* ***************** */
> > /* This is a comment */
> > /* ***************** */
> > 
> > How do I do that? What variables do I have to configure? What hooks 
> > should i use?
> > 
> > A Note to ESS developers:
> > As SAS does not treat comments like "** **;" as comments in all 
> > situations (e.g. in macros, on same line as commands), I prefer "/* */".
> > I suggest a flexible, easy way to change between those comment styles as 
> > both have their advantages and drawbacks.(cf. 
> > http://support.sas.com/onlinedoc/913/getDoc/sv/lrdict.hlp/a000289375.htm#a000852196)
> > 
> > Best, Will
> > 
> 
> Hi Will:
> 
> I suppose this would be a nice feature to add.  However, I can say that 
> I rarely see comments like the first block.  The * ; and %* ; style
> comments are really for one-liners, i.e. you are commenting out only
> one line of code.  For blocks, it's more likely that you see a single
> /* at the beginning and a single */ some lines later.  I see your second
> block has them on every line!?!  So, this is an unusual arrangement in
> my experience.  I didn't click on the link so maybe there was a very
> interesting discussion about why you would want to do something like
> this.  However, I don't see people doing that.
> 
> Thanks,
> 
> Rodney
The * at the start of each line of a block comment seems to be the
standard where I work, though I personally tend not to use it. FWIW.
Ross




More information about the ESS-help mailing list