Skip to content
Prev 17163 / 63424 Next

parse():ing a unclosed string

Prof Brian Ripley wrote:
I'm write the contents of character variable 'code' to file 'foo.R', 
that is, I'm generating a file containing the nine characters "x <- 
'123", then parsing it below.
> parse()
?x <- '123
Error in parse(file, n, text, prompt) : parse error
 >

where press ENTER directly after "123". I'm not exactly sure what is 
happen when I press enter and when or if a EOF is generated, but this 
was the only test I did for stdin().
I know, but behind a 56k-modem (again) ;( and though was better to 
report anything than nothing.

/Henrik