Re: OctPlot ver 0.2.0 released

"John W. Eaton" <[email protected]> Mon, 22 Nov 2004 00:38:12 -0500
Newsgroups gmane.comp.gnu.octave.graphics,gmane.comp.gnu.octave.maintainers
Message-ID <[email protected]>
On 21-Nov-2004, Rafael Laboissiere <[email protected]> wrote:

| Using end for indexing cells does not work here:
| 
| $ octave-config --version
| 2.1.63
| $ octave -q
| octave:1> a={1,2,3};
| octave:2> a{end}
| error: invalid use of end
| error: evaluating argument list element number 1
| 
| If this did work in 2.1.57, then its failing in 2.1.63 is probably
| unintended.  I am Cc:ing this message to octave-maintainers.

Please try the following patch.

Thanks,

jwe


src/ChangeLog:

2004-11-22  John W. Eaton  <[email protected]>

	* pt-arg-list.cc (tree_argument_list::convert_to_const_vector):
	Check to see whether object is a function or function handle
	instead of constant.
 

Index: src/pt-arg-list.cc
===================================================================
RCS file: /usr/local/cvsroot/octave/src/pt-arg-list.cc,v
retrieving revision 1.22
diff -u -r1.22 pt-arg-list.cc
--- src/pt-arg-list.cc	17 Nov 2004 15:27:54 -0000	1.22
+++ src/pt-arg-list.cc	22 Nov 2004 05:36:04 -0000
@@ -174,7 +174,9 @@
   // way of asking an octave_value object this question?
 
   bool stash_object = (list_includes_magic_end
-		       && object && object->is_constant ());
+		       && object
+		       && ! (object->is_function ()
+			     || object->is_function_handle ()));
 
   if (stash_object)
     {