[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #36240] incorrect isargout after using a trail
From: |
John Hunt |
Subject: |
[Octave-bug-tracker] [bug #36240] incorrect isargout after using a trailing ~ once |
Date: |
Wed, 18 Apr 2012 14:53:06 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 |
URL:
<http://savannah.gnu.org/bugs/?36240>
Summary: incorrect isargout after using a trailing ~ once
Project: GNU Octave
Submitted by: huntj
Submitted on: Wed 18 Apr 2012 02:53:05 PM GMT
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: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
The following bug is probably the reason for
bug #36221
which is thus not limited to unique.
the try_isargout.m function attached does not work after
being called with a trailing ~ as in
[x, ~] = try_isargout()
octave:1> [x, y] = try_isargout()
warning: nbh: 0
ans =
1 1
x = 4
y = 5
octave:2> [x] = try_isargout()
warning: nbh: 0
ans =
1 0
x = 4
octave:3> [x, y] = try_isargout()
warning: nbh: 0
ans =
1 1
x = 4
y = 5
octave:4> [x, ~] = try_isargout()
warning: nbh: 1
ans =
1 0
x = 4
octave:5> [x, y] = try_isargout()
warning: nbh: 0
ans =
1 0
x = 4
y = [](0x0)
it seems that p->is_black_hole() returns wrong results,
since nbh is wrong. This sis shown by the warnings I added
line 612 of src/ov-usr-fcn.cc :
for (std::list<octave_lvalue>::const_iterator p = lvalue_list->begin ();
p != lvalue_list->end (); p++)
nbh += p->is_black_hole ();
warning("nbh: %d", nbh);
the behaviour is the same in 3.6.1 and in
the latest hg pull
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 18 Apr 2012 02:53:05 PM GMT Name: try_isargout.m Size: 156B By:
huntj
<http://savannah.gnu.org/bugs/download.php?file_id=25682>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36240>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #36240] incorrect isargout after using a trailing ~ once,
John Hunt <=