From Don.Wingate@intellichem.com  Tue Oct  3 22:26:06 2000
From: Don.Wingate@intellichem.com (Don Wingate)
Date: Tue, 3 Oct 2000 14:26:06 -0700
Subject: [Rd] FW: Parse Errors
Message-ID: <MPEHJEGLNPNFGJFOJMKNIEDBCAAA.Don.Wingate@IntelliChem.com>

Earlier I posted the message below to R-announce. Please, let me appologize
for this mistake, it was not intended. The solution was provided by Duncan
Murdoch who passed on a message he recieved from Brian Ripley which informed
me that settimg R_Interactive to 1 changes the default behavor of aborting
on an error.

Thankyou, Don Wingate.


-----Original Message-----
From: Don Wingate [mailto:Don.Wingate@IntelliChem.com]
Sent: Tuesday, October 03, 2000 9:35 AM
To: r-announce@lists.R-project.org
Subject: Parse Errors


Dear R Development Team,

Using Thomas Baier's R Com Server -- or a dll I am building which supports
an evaluate function that is based on Baier's function R_Proxy_evaluate
contained in proxy_impl.c -- when I issue an invalid command to R such as
"plo(x)" the program crashes. There is code in R_Proxy_evaluate to test for
a parse error before actually generating code and issuing the command - He
calls R_Parse1Buffer(&lBuffer,0,&lStatus) and then tests the value of
lStatus for parse error. The trouble is that lStatus == PARSE_OK even though
the command is invalid, so the evaluation continues until eval() is called,
at which point R terminates and crashes the program.  (It does write an
error message to the console first, but crashes after that.)

Is there a way to handle this? The same command can be issued inside
RGui.exe or RTerm.exe with out a problem.

Thankyou, Don Wingate.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] FW: Parse Errors
Don Wingate