On 29/08/2009 6:05 PM, John Sorkin wrote:
For my money, and perspective as one who has written a compiler, this reflects 
a failing of the R parser. Both

if (TRUE) {
     cat("TRUE!!\n")
}
else
{
     cat("FALSE!!\n")
}

and


if (TRUE) {
     cat("TRUE!!\n")
  }
else
  {
     cat("FALSE!!\n")
  }

are easy to read, and should be accepted as a valid if . . . . else statement.

And if you enter

if (FALSE) {
     cat("TRUE!!\n")
}

at the console, how long should it wait before it decides the else isn't coming?

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to