[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info-beta
Subject:    mental lapse
From:       Daniel J Sebald <daniel.sebald () ieee ! org>
Date:       2003-07-18 5:37:21
[Download RAW message or body]

> I also think the "continue" statement should work.  If you read
> about "continue" in a C book, you might see (as I did) that it is
> supposed to jump outside the "while" or "do" loop it is in.  (The
> "break" of case 'N' is associated with switch statement so that
> should stay within the while loop in this case.)  Also, "continue"
> will jump to the increment phase of a "for" loop, which doesn't
> apply here.  OK, now try using "continue" instead of "return 1"
> that fixed the bug... for me, it doesn't work to my surprise.  So,
> I am starting to wonder if there is a compiler bug.  And, with
> this "continue" statement being commented-out, perhaps
> someone ran across the same quandry I had and thought
> "a continue should be here but it doesn't seem to make a
> difference". 



I momentarily mixed up "break" and "continue".  (I may owe
Ethan a beverage of his choice or something.)  It has dawned
on me there is really no elegant way to break out of a while()
loop from within a case statement.  But anyway, that doesn't
lessen the main point that the 'N' and 'G' cases should exit the
'record()' function to avoid X11 events not being processed.
I guess "return 1" is the only way to do that.

Dan



[[[[ unsubscribe from info-gnuplot-beta via majordomo@dartmouth.edu ]]]]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic