Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3861

Re: How to get out of an endless loop ?

From Ethan Merritt <sfeam@users.sf.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: How to get out of an endless loop ?
Date 2018-01-19 02:20 +0000
Organization A noiseless patient Spider
Message-ID <p3rkki$4pj$1@dont-email.me> (permalink)
References <b72d610b-8ff5-49f7-8635-29b53e4785b9@googlegroups.com>

Show all headers | View raw


On Thu, 18 Jan 2018 13:23:00 -0800, robertvanpass wrote:

> Hi,
> 
> I have a datafile which is continuously updated.
> To plot this, I use an endless loop (simplified):
> 
> plot datafile while (1) {pause 1 ; replot}
> 
> How can I pause/unpause and stop this loop without exiting Gnuplot
> altogether ?
> 
> Thanks already.

I think the standard answer to such a question is "don't do that".

Instead of making an infinite loop
	while(1)
make it a test on something you can control externally.
Exactly what would work depends on the context in which the
program is run, but a typical example would be creation/deletion
of a named file.

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar


Thread

How to get out of an endless loop ? robertvanpass@gmail.com - 2018-01-18 13:23 -0800
  Re: How to get out of an endless loop ? Ethan Merritt <sfeam@users.sf.net> - 2018-01-19 02:20 +0000

csiph-web