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


Groups > comp.graphics.apps.gnuplot > #3859 > unrolled thread

How to get out of an endless loop ?

Started byrobertvanpass@gmail.com
First post2018-01-18 13:23 -0800
Last post2018-01-19 02:20 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  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

#3859 — How to get out of an endless loop ?

Fromrobertvanpass@gmail.com
Date2018-01-18 13:23 -0800
SubjectHow to get out of an endless loop ?
Message-ID<b72d610b-8ff5-49f7-8635-29b53e4785b9@googlegroups.com>
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.

[toc] | [next] | [standalone]


#3861

FromEthan Merritt <sfeam@users.sf.net>
Date2018-01-19 02:20 +0000
Message-ID<p3rkki$4pj$1@dont-email.me>
In reply to#3859
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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web