[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: proceeding beyond roctab 2000 error msg - correction
Me too, as it were.
Yesterday I wrote:
Yes. I don't think you need [P] to understand _rc.
. whelp _rc
gets you started. _rc is usually zero, whenever
a command works -- to Stata's satisfaction. If
you see a message like
unrecognized command: rgeress
r(199) is _rc of 199 in another guise.
This was wrong. _rc is not just another
way of reporting return codes.
Gary Longton and David Kantor gave
the correct answer.
> You're right. I have always assumed that the error code
> shown after an
> error is put in _rc, but it isn't -- you learn something new
> every day.
> This explains some previous wondering on my part when I find
> nonzero return
> codes after executing ados that ran without an error. I now
> realize that
> these were captured inside the ado -- a potentially confusing
> feature when
> you see a nonzero _rc after running the ado because of a line
> like -cap
> confirm string var xxx -.
> > I think that David was actually correct: _rc is a system
> scalar holding
> > return code from the most recent -capture- command. See [U]16.4 or
> > yourself by displaying (-display _rc-) after any erroneous
> Stata command
> > without -capture-.
> > Though a Stata command may return a variety of error codes,
> the code will
> not be
> > "captured" in the scalar _rc unless -capture- precedes that command.
* For searches and help try: