help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Surprising 'exit()' behavior at debug prompt


From: Glenn Golden
Subject: Surprising 'exit()' behavior at debug prompt
Date: Tue, 27 Apr 2004 15:58:36 -0600

Running 2.1.57 on RH7.3, Intel.

Not sure if the following is a bug, or my misinterpretation of how
exit() and semicolon work when in the debug environment. 

Trivial script to get to debug prompt:

foo.m:

    fprintf(stderr, "starting\n");
    keyboard("Hey> ");
    fprintf(stderr, "continuing\n");


So,

    1>   foo
    starting
    Hey> 1
    ans = 1
    Hey> exit
    continuing

which is as expected, i.e. exit() returns to script flow.


But:

    2>   foo
    starting
    Hey> 1; exit
    bash$>

exits Octave, never (evidently) returning to script flow.
Same behavior in 2.1.50.

Needless to say, this can be painful, even if it is correct.
What's the story on this?

Thx,
Glenn



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]