From bug-octave-request at bevo dot che dot wisc dot edu Tue Oct 24 18:36:06 1995 Subject: error in assignment of multivalued functions From: John Eaton To: Ferdinand Schinagl Cc: bug-octave at bevo dot che dot wisc dot edu Date: Tue, 24 Oct 1995 18:36:06 -0500 Ferdinand Schinagl wrote: : I'm using actual (v1.1.1) binary distributions of octave: : : i486-linux : hppa1.1-hp-hpux9.01 : : and both versions produce the error message, : : a = 1 : error: element number 2 undefined in return list : error: evaluating assignment expression near line 2, column 8 : : when I try to evaluate: : : octave:1> function [x,y,z]=f() : > x=1; : > z=2; : > end : : octave:2> [a,b,c]=f() : : This code is said (see the documentation) to produce: : : a = 1 : b = [](0x0) : c = 2 It should work as you expect if you set the built-in variable define_all_return_values to "true". (I've added this to the list of things to fix in the docs). Thanks, jwe