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

 
 

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

Submitted by:  Francesco Potortì <pot>
Submitted on:  Thu 02 Jun 2016 11:29:56 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: DuplicateAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project Administrator
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 File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by siko1056 (Updated the item)
  • -unavailable- added by pot (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Jun 2016 02:33:39 PM UTCmtmillerDependencies-=>Depends on bugs #48064
    Thu 02 Jun 2016 02:33:28 PM UTCmtmillerStatusNone=>Duplicate
      Open/ClosedOpen=>Closed
    Thu 02 Jun 2016 02:11:11 PM UTCsiko1056Summaryfor loop on struct requires to return values=>for loop on struct requires two return values

    Back to the top


    Powered by Savane 3.1-cleanup1