From laurent.gatto at gmail.com  Wed Sep 22 09:33:20 2010
From: laurent.gatto at gmail.com (Laurent Gatto)
Date: Wed, 22 Sep 2010 08:33:20 +0100
Subject: [Rd] OT: Reason/history behind ## notation for comments?
In-Reply-To: <AANLkTimRgeGVxira9GzJoBfPSyWKYxBcbD1TALXzFYd9@mail.gmail.com>
References: <AANLkTimRgeGVxira9GzJoBfPSyWKYxBcbD1TALXzFYd9@mail.gmail.com>
Message-ID: <AANLkTime_rZcJNCttC01nZbJRfgs-n0rXy_PnuDgcapw@mail.gmail.com>

For what concerns emacs users, the number of '#' has different effects
on the position of the comment. From the ESS manual: 'By default,
comments beginning with ?###? are aligned to the beginning of the
line. Comments beginning with ?##? are aligned to the current level of
indentation for the block containing the comment. Finally, comments
beginning with ?#? are aligned to a column on the right...'. I guess
that ## is the most wanted indentation for comments.

Best wishes,

Laurent

On 22 September 2010 07:26, Henrik Bengtsson <hb at stat.berkeley.edu> wrote:
> Off topic, but since I've observe both styles, does anyone know the
> history behind/reason for using ## instead of a single # to start
> comments in R. ?I know some editors do this by default. ?Is it because
> in C it is easier to distinguish (search/replace/...) comments from C
> preprocessor directives such as #include, and that's became a de facto
> standard elsewhere?
>
> /Henrik
>
> PS. I don't want to get into a debate on what's the best style.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] OT: Reason/history behind ## notation for comments?
Laurent Gatto