Skip to content
Prev 175960 / 398503 Next

new line between '}' and 'else' in function body

Hi,

That's because the parser knows how to deal with that stuff. However, 
when you type the same if/else at the command line, it will be parsed 
line by line, and the evaluator will not wait for the else to evaluate 
the if. Try to copy and paste your if/else to the command line.

Romain
Yihui Xie wrote: