bugGNU Octave - Bugs: bug #48089, for loop on struct requires two...

 
 

bug #48089: for loop on struct requires two return values

Submitter:  Francesco Potortì <pot>
Submitted:  Thu 02 Jun 2016 11:29:56 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.2 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 02 Jun 2016 02:33:28 PM UTC, comment #2: 

This was just reported as bug #48064, closing as a duplicate.

Mike Miller <mtmiller>
Group Member
Thu 02 Jun 2016 11:31:44 AM UTC, comment #1: 

Sorry the title should be "requires TWO return values"

Francesco Potortì <pot>
Thu 02 Jun 2016 11:29:56 AM UTC, original submission:  

Contrary to what declared in the docs, the last three commands give different results, while they should be equivalent:

> clear a
> a.first.fd = 1;
> a.second.fd = 2;


> for [val key] = a; disp(val.fd); endfor

       1
       2

> for [val] = a; disp(val.fd); endfor

error: structure has no member 'fd'
error: evaluating argument list element number 1

> for val = a; disp(val.fd); endfor

error: structure has no member 'fd'
error: evaluating argument list element number 1

Francesco Potortì <pot>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by pot (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-02 mtmiller Dependencies- Depends on bugs #48064
    2016-06-02 mtmiller StatusNone Duplicate
        Open/ClosedOpen Closed
    2016-06-02 siko1056 Summaryfor loop on struct requires to return values for loop on struct requires two return values

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code