Running scripts and accumulation of symbols at the command line prompt

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Running scripts and accumulation of symbols at the command line prompt

pathematica
I am slightly embarrassed to ask what might be a very basic question. I would consider myself a mathematician learning enough syntax to use Octave for mathematical purposes rather than a programmer. I do love Octave though!

I have a series of scripts (written and passed to Octave in the QtOctave environment). I use them to build up a variety of diagrams in stages (using a conventional backend output to gnuplot). This requires passing variables between scripts. I have tried to declare global variables where required and clear them where sensible. There may be some loose variables which, whilst not defined as global, survive during a session. It can be difficult to spot them when running and rerunning scripts out of sequence.

When some scripts are run, sometimes the terminal accumulates large numbers of the "greater than" signs at the end of the command line prompt (usually there are three in the terminal provided by QtOctave).

Sometimes QtOctave hangs. This does not happen every time there are large numbers of greater than prompts but they are usually there when it does.

The same script run repeatedly behaves unpredictably. There may be several runs with large numbers of signs and then one with the normal number of three. Sometimes it leads to a hang on one of the repeats.

I presume the increase in the number of prompt symbols is trying to tell me something but I cannot discover what it might be. I realise that it might be related to QtOctave rather than to Octave and I apologise if this is not something to do with Octave and therefore not a relevant question here.

Is there is a simple explanation?

It might be that it reflects my sloppy programming style or I am doing something stupid - don't worry, I have no pride!
However good you think Octave is, it's much, much better.
Reply | Threaded
Open this post in threaded view
|

Re: Running scripts and accumulation of symbols at the command line prompt

martin_helm
Am Sonntag, 8. August 2010 15:02:36 schrieb pathematica:

> I am slightly embarrassed to ask what might be a very basic question. I
>  would consider myself a mathematician learning enough syntax to use Octave
>  for mathematical purposes rather than a programmer. I do love Octave
>  though!
>
> I have a series of scripts (written and passed to Octave in the QtOctave
> environment). I use them to build up a variety of diagrams in stages (using
> a conventional backend output to gnuplot). This requires passing variables
> between scripts. I have tried to declare global variables where required
>  and clear them where sensible. There may be some loose variables which,
>  whilst not defined as global, survive during a session. It can be
>  difficult to spot them when running and rerunning scripts out of sequence.
>
> When some scripts are run, sometimes the terminal accumulates large numbers
> of the "greater than" signs at the end of the command line prompt (usually
> there are three in the terminal provided by QtOctave).
>
> Sometimes QtOctave hangs. This does not happen every time there are large
> numbers of greater than prompts but they are usually there when it does.
>
> The same script run repeatedly behaves unpredictably. There may be several
> runs with large numbers of signs and then one with the normal number of
> three. Sometimes it leads to a hang on one of the repeats.
>
> I presume the increase in the number of prompt symbols is trying to tell me
> something but I cannot discover what it might be. I realise that it might
>  be related to QtOctave rather than to Octave and I apologise if this is
>  not something to do with Octave and therefore not a relevant question
>  here.
>
> Is there is a simple explanation?
>
> It might be that it reflects my sloppy programming style or I am doing
> something stupid - don't worry, I have no pride!
>

Hello,

I have the feeling that this really might be some side effect between octave
and qtoctave (I played with it some time ago - two or three years ago - but
went back to more traditional programming with emacs and at the moment I
prefer gedit) and I remember some strange effects.
One suggestion from my side would be to check if the same problem with the
same script(s) also happen without qtoctave if you test your workflow simply
from the command line.
If you can reproduce it without qtoctave, can you try to create a simplest
situation which reproduces it and post it?
If it does not happen without qtoctave you should contact the qtoctave
developer, maybe there is already a fix for it if it is a known problem or
he/she is willing to make it work based on your input.

As a side note I remember the >>> octave prompt it happens for example when
some commands run in the initialization of qtoctave it is or was just a
visualization problem that one prompt sign per initialization command was
echoed in qtoctave but without a line break.

- mh
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Running scripts and accumulation of symbols at the command line prompt

pathematica
Thanks. I'll try some of those suggestions.
However good you think Octave is, it's much, much better.