Displaying 1 result from an estimated 1 matches for "these15".
Did you mean:
these12
2012 Jan 12
2
is there an equivalent for #ifdef (C langage) in R
...f(useDebug(0)){
#Here I do not use debug mode
make_addition = function(a, b) {
c=a+b
plot(c)
return(c)
}
}else{
#here I use debug mode
c=a+b
}
I assume this would work... The problem is :
if I have 15 lines of code in if{ } bloc I have to copy and paste these15
lines into else{} bloc. These is too many lines in my file...
Is there something like (in C langage):
#define DEBUG 1
#ifndef DEBUG
make_addition = function(a, b) {
#endif
#ifdef DEBUG
a = 1
b = 2
#endif
c=a+b
plot(c)
#ifndef DEBUG
return(c)
}
#endif
my goal is to ru...