[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50893] for loop index variable not initialize
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered |
Date: |
Fri, 28 Apr 2017 14:32:11 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 |
Update of bug #50893 (project octave):
Category: None => Interpreter
Severity: 3 - Normal => 2 - Minor
Priority: 5 - Normal => 3 - Low
Item Group: None => Matlab Compatibility
Status: None => Confirmed
_______________________________________________________
Follow-up Comment #2:
Confirmed. And as a clue to tracking this down, it appears to happen only
with ranges. For example, this works despite the
for k = zeros (0,3)
disp (k);
end
[](0x1)
[](0x1)
[](0x1)
whos k
Variables in the current scope:
Attr Name Size Bytes Class
==== ==== ==== ===== =====
k 0x1 0 double
Total is 0 elements using 0 bytes
Could you run the sample code above in Matlab to see what it does? They may
check whether the loop body is empty before executing anything. In that case,
I would expect that k would be of size 0x3 and no loop body would be
executed.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50893>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered, Ceral Paquet, 2017/04/28
- [Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered, John W. Eaton, 2017/04/28
- [Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered,
Rik <=
- [Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered, Rik, 2017/04/28
- [Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered, Ceral Paquet, 2017/04/28
- [Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered, Ceral Paquet, 2017/04/28
- [Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered, Rik, 2017/04/28
- [Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered, John W. Eaton, 2017/04/28
- [Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered, Ceral Paquet, 2017/04/29
- [Octave-bug-tracker] [bug #50893] for loop index variable not initialized unless loop is entered, Rik, 2017/04/29