x = input('message') malfunctions in Scilab 6. It was OK in Scilab 5 and earlier.
Reported by Joe Seale
Bug Sample.sce (1.78 KB, text/x-csrc)
Shows how input() works in Scilab 6, with comments and work-around.
BUG DESCRIPTION:Previously x = input('message') allowed me to input a value for x immediately following the message, on the same line. The message would include a default value. If I hit Enter with no input, it set x = [], but I could test for [] and provide a default value. Now input() gives a linefeed on the console, after which I can enter a value on the new line or just "Enter", but a second instance of input() in the same program gives an erroneous '-->' prompt and requires that I hit "Enter", then I get a repeat of the message, and finally get to enter a value on still another line. As shown in the example "How To Reproduce" my work-around is to use evstr(x_dialog('message','default_value')); but this goes much slower since I have to go from keyboard to mouse, click the dialog box, back to the keyboard to backspace and enter a value, and then finish with keyboard Enter or mouse OK. Used in an audio clean-up-many-details program, doing hundreds of edits in a session, the evstr(x_dislog(etc.)) takes much more time. Also, in trying out several values of an audio control variable to see what sounded best, it was useful to see a record of the values I had previously tried, right on the console. The extra linefeed and repeated message (for a second instance of input() ) spread out my previous entries so that I can see fewer prior attempts onscreen without having to scroll the screen. I much preferred the old version of input() with no extra linefeed, never mind the error.
----------------
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG: See the attachment, which reproduces the bug and shows the evstr(x_dialog(etc.)) work-around.
-------------------------
OTHER INFORMATION:
------------------