Lost comments (was Re: R-alpha: New version of R for testing)

Arne Kovac
Sun, 27 Jul 1997 03:15:01 -0000

On Wed, 23 Jul 1997, Ross Ihaka wrote:

>  o  Comments are handled better in functions.  The rule is that they
>     are shifted to just before their statements.  Comments after the
>     last statement of a function are lost.

More generally each comment between the last statement of a block and its
closing bracket is lost!! I wonder if this is really an advantage: I just
"uncommented" a line for test purposes to see some minutes later that
I
had to retype it again. :-(

> dummy<-
+ function ()
+ {
+         for (i in 1:3) {
+                 print(1)
+                #print(2)
+         }
+         More()
+         Commands()
+ }
> dummy
function ()
{
        for (i in 1:3) {
                print(1)
        }
        More()
        Commands()
}

Arne Kovac

--
Arne Kovac
School of Mathematics           Phone: +44 (0117) 942 7551
University of Bristol           A.Kovac@bristol.ac.uk
University Walk                 http://www.stats.bris.ac.uk/~maak
Bristol, BS8 1TW, U.K.


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To:
r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-