[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with "yes_or_no" and newline character
From: |
Michael Goffioul |
Subject: |
Problem with "yes_or_no" and newline character |
Date: |
Wed, 4 Apr 2007 14:12:53 +0200 |
Hi,
When executing
eval('yes_or_no("Close ? ")')
the "yes_or_no" never terminates, because the newline character
is appended to the string returned by interactive_input, which is not
expected by yes_or_no. When doing the call within "eval", "line_editing"
is set to false, resulting in "gnu_readline" calling "octave_fgets" instead
of "command_editor::readline". The problem is that "octave_fgets" includes
the newline character, while "command_editor::readline" does not.
Using "octave_fgetl" would probably solve the problem (cannot test for
the moment).
Michael.
- Problem with "yes_or_no" and newline character,
Michael Goffioul <=