From bug-octave-request at bevo dot che dot wisc dot edu Mon Dec 15 22:53:41 2003 Subject: unknown type for structure array slices From: "John W. Eaton" To: Paul Kienzle Cc: bug-octave at bevo dot che dot wisc dot edu Date: Mon, 15 Dec 2003 22:53:39 -0600 On 15-Dec-2003, Paul Kienzle wrote: | In octave-2.1.52 debian and octave-cvs-2003-12-15, typeinfo for | structure array slices is confused: | | octave:1> t(3).a = 1; | octave:2> typeinfo(t.a) | | *** typeinfo: | | - Built-in Function: typeinfo (EXPR) | Return the type of the expression EXPR, as a string. If EXPR is | omitted, return an array of strings containing all the currently | installed data types. | | | octave:3> t.a | ans = | | (, | [1] = [](0x0) | [2] = [](0x0) | [3] = 1 | ,) This is not a bug because t.a is a comma-separated list, and in a function call context, the elements of the list are passed as separate arguments. So in the above, typeinfo (t.a) is equivalent to typeinfo (t(1).a, t(2).a, t(3).a) jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------