R-alpha: 0.50-a1 -- "more lost comments"

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Mon, 4 Aug 1997 11:47:35 +0200


In CHANGES, it says

------------------------------------------------------------
>> BUG FIXES

   ........

>>  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.
------------------------------------------------------------
I think we could live with the above advertized behavior.
Unfortunately, in the following case 'xx1' even a comment BEFORE the last
statement is lost 
 ((because the last statement is so trivial ???,
   it is NOT lost in the  'xx1a' example  (and in others I tried)) :

This is in plain  0.50-a1 :

> xx1 <- function(x) {
+  ##--- a Start-comment ... (lost in 0.50-a1)
+  x
+ }
> xx1 
function (x) 
{
        x
}


> xx1a <- function(x) {
+   ##--- a Start-comment ... (ok in 0.50-a1)
+   x+1
+ }
> xx1a
function (x) 
{
        ##--- a Start-comment ... (ok in 0.50-a1)
        x + 1
}

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