bugGNU Octave - Bugs: bug #42111, ans = [] for input()

 
 

bug #42111: ans = [] for input()

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Sun 13 Apr 2014 09:34:35 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Ben AbbottOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 24 Apr 2014 09:10:28 PM UTC, comment #2:

I pushed a patch that handles nargout=0 as well as preserving an arbitrary number for nargout (http://hg.savannah.gnu.org/hgweb/octave/rev/1dcc9539234c). I also cleaned up the documentation to expand on the fact that the number of outputs, their size, and their class depend on the expression that is input.

Rik <rik5>
Project Administrator
Tue 15 Apr 2014 10:33:41 AM UTC, comment #1:

FYI:

works in Matlab 2012b and Octave 3.8.0. I did not try out your patch, but nargout>1 should be kept working.

By the way: Contrary to the behavior above, the documentation in 3.8.0 still states that "Currently, `input' only returns one value, regardless of the number of values produced by the evaluation of the expression."

Markus Appel <mappel>
Sun 13 Apr 2014 09:34:35 PM UTC, original submission:

The "input()" function returns an empty result when nargout = 0.

This was originally reported on the help list.

http://lists.gnu.org/archive/html/help-octave/2014-04/msg00131.html

The patch below works for me, but I'm not sure if this is a proper fix.

Should "get_user_input ()" be modified to always return at least one arg?

Ben Abbott <bpabbott>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mappel (Posted a comment)
  • -unavailable- added by bpabbott (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 24 Apr 2014 09:10:28 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1