octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48089] for loop on struct requires to return


From: Francesco Potortì
Subject: [Octave-bug-tracker] [bug #48089] for loop on struct requires to return values
Date: Thu, 2 Jun 2016 11:29:58 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux i686; rv:41.0) Gecko/20100101 Firefox/41.0

URL:
  <http://savannah.gnu.org/bugs/?48089>

                 Summary: for loop on struct requires to return values
                 Project: GNU Octave
            Submitted by: pot
            Submitted on: Thu 02 Jun 2016 01:29:56 PM CEST
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.2
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48089>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]