Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input statement in a For loop hangs after first iteration #179

Open
alanbazzaz opened this issue Jul 24, 2020 · 1 comment
Open

Input statement in a For loop hangs after first iteration #179

alanbazzaz opened this issue Jul 24, 2020 · 1 comment

Comments

@alanbazzaz
Copy link

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?

@dsblank
Copy link
Member

dsblank commented Jul 24, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants