|
From: | Mike Miller |
Subject: | [Octave-bug-tracker] [bug #43097] if (object) should call if (logical(object)) |
Date: | Tue, 17 May 2016 16:33:36 +0000 (UTC) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 |
Update of bug #43097 (project octave): Status: None => Patch Submitted _______________________________________________________ Follow-up Comment #3: So this is for old-style classes defined by an @class directory I suppose. Objects implemented in C++ can override the octave_base_value::is_true method for this purpose. As far as I can tell, this would be implemented by adding a method octave_class::is_true and having it look up and evaluate the "logical" method. Something like the attached diff seems to work for me. (file #37187) _______________________________________________________ Additional Item Attachment: File name: bug43097.diff Size:1 KB _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?43097> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |