|
From: Ethan M. <merritt@u.washington.edu> - 2012-02-08 19:53:26
|
On Wednesday, February 08, 2012 10:32:28 am pl...@pi... wrote:
> HI,
>
> unless I'm reading it wrongly or it simply unclear , it seems that exit
> is not doing what it says on the box.
Known bug, although I don't see a tracker item for it.
Feel free to add one.
As I recall, it behaves unreliably inside nested "load" commands
as well. I think the problem was introduced when the lf_push()/
lf_pop() code was revised, but I'm not sure whether the interaction
with block constucts is a consequence or a separate bug.
Ethan
> I have a test file:
>
> test_val=0
> if (test_val != 1) {print "*** an error was found ; exit without
> plotting sine ***" ; exit; print "end of if"}
> plot sin(x);
> print "no errors, sine was plotted";
>
>
> when I load this from gnuplot DO get the plot of sine and the following
> output :
>
> gnuplot> load "test.gnu"
> *** an error was found ; exit without plotting sine ***
> no errors, sine was plotted
> gnuplot>
>
>
> help exit :
>
> >>
> The commands `exit` and `quit`, as well as the END-OF-FILE character
> (usually
> Ctrl-D) terminate input from the current input stream: terminal
> session, pipe,
> and file input (pipe).
>
> If input streams are nested (inherited `load` scripts), then reading will
> continue in the parent stream.
> >>
>
>
> From this I was expecting exit to exit from the loaded script and
> return me to the gnuplot prompt.
>
> Instead only seems to have exited from the if block.
>
> Does the doc need clarifying or is this an unintended consequence of the
> new blocked if structures?
>
> regards, Peter.
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>
--
Ethan A Merritt
Biomolecular Structure Center, K-428 Health Sciences Bldg
University of Washington, Seattle 98195-7742
|