On Thu, Aug 20, 2009 at 1:27 PM, David Winsemiusdwinsem...@comcast.net wrote:
...
But an extremely simple modification succeeds:
if ( 0 ) {
commented with zero
} else {
commented with one
}
Returns:
[1] \ncommented with one\n
Yes, but of course that executes neither one nor the
Why not
if ( 0 ) {
commented with zero
} else {
commented with one
}
Greg Snow-2 wrote:
I believe that #if lines for C++ programs is handled by the preprocessor,
not the compiler. So if you want the same functionality for R programs,
it would make sense to just preprocess the R file.
Subject: Re: [R] Is there a construct for conditional comment?
Why not
if ( 0 ) {
commented with zero
} else {
commented with one
}
Greg Snow-2 wrote:
I believe that #if lines for C++ programs is handled by the
preprocessor,
not the compiler. So if you want the same
On 8/20/2009 11:54 AM, Steve Jaffe wrote:
Why not
if ( 0 ) {
commented with zero
} else {
commented with one
}
Because that doesn't work unless the comments are syntactically correct
R. For example, yours gives:
Error in source(clipboard) : clipboard:2:11: unexpected symbol
1: if ( 0 ) {
On Aug 20, 2009, at 1:19 PM, Duncan Murdoch wrote:
On 8/20/2009 11:54 AM, Steve Jaffe wrote:
Why not
if ( 0 ) {
commented with zero
} else {
commented with one
}
But an extremely simple modification succeeds:
if ( 0 ) {
commented with zero
} else {
commented with one
}
Returns:
[1]
...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of Peng Yu
Sent: Tuesday, August 18, 2009 3:55 PM
To: r-h...@stat.math.ethz.ch
Subject: [R] Is there a construct for conditional comment?
Hi,
In C++, I can
Hi,
In C++, I can use the following construct to choice either of the two
blocks the comment but not both. Depending on whether the number after
#if is zero or not, the commented block can be chose. I'm wondering
if such thing is possible in R?
#if 0
commented with 0
#else
commented with 1
On 18/08/2009 5:54 PM, Peng Yu wrote:
Hi,
In C++, I can use the following construct to choice either of the two
blocks the comment but not both. Depending on whether the number after
#if is zero or not, the commented block can be chose. I'm wondering
if such thing is possible in R?
No. The
8 matches
Mail list logo