octave_kernel icon indicating copy to clipboard operation
octave_kernel copied to clipboard

Input statement in a For loop hangs after first iteration

Open alanbazzaz opened this issue 5 years ago • 1 comments

Puzzled why the input statement (and other i/o statements) don't work after the first iteration.

Here's my simple code for i=1:3 s = input ("Pick a number, any number! ", "s") fprintf('your number is: ', s); end

First iteration, displays the prompt with a window to enter the number. Then it prints the number as expected. But nothing after that. I can see the kernel is running in Jupyter, but no prompt. Nothing happen, even if I enter a number. I did similar experiments with Pause, and plotting in a loop, with similar results.

Where should I look?

alanbazzaz avatar Jul 24 '20 17:07 alanbazzaz

Yeah, that is probably not going to be easy to fix. You can look at the way that the kernel talks to the octave executable, but that is probably not easily put into a loop controlled by octave.

dsblank avatar Jul 24 '20 18:07 dsblank