From J.C.Rougier@durham.ac.uk  Wed Feb 10 13:44:35 1999
From: J.C.Rougier@durham.ac.uk (J.C.Rougier@durham.ac.uk)
Date: Wed, 10 Feb 1999 14:44:35 +0100
Subject: Function parsing (PR#118)
Message-ID: <199902101344.OAA02583@biostat.ku.dk>

Is anyone else concerned with the way in which the R function parser
relocates comments that occur after condional expressions in functions to
before, i.e. 

fred <- function(x) {
 # wonder what x is like
 if (x>0) stop("Sorry non-positive x only")
 # that showed x big-time!
 x
}

but then fred is parsed and stored as 

"fred" <-
function (x) 
{
    # wonder what x is like
    # that showed x big-time!
    if (x > 0) 
        stop("Sorry non-positive x only")
    x
}

It turns out that my programming style often includes comments after
conditionals, and I find this re-location a bit confusing.

Cheers, Jonathan.

Jonathan Rougier                       Science Laboratories
Department of Mathematical Sciences    South Road
University of Durham                   Durham DH1 3LE

"[B]egin upon the precept ... that the things we see are to be 
 weighed in the scale with what we know"  (Meredith, 1879, The Egoist)


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Function parsing (PR#118)
J.C.Rougier@durham.ac.uk