From help-octave-request at bevo dot che dot wisc dot edu Fri Jan 19 10:35:50 2001 Subject: Re: .oct-files/ library-wrapper From: "John W. Eaton" To: bsapp at lanl dot gov Cc: Daniel Heiserer , "help-octave@bevo.che.wisc.edu" Date: Fri, 19 Jan 2001 10:35:38 -0600 On 19-Jan-2001, Ben Sapp wrote: | Daniel Heiserer wrote: | | > How do I know what kind of datatype is args(j)? | | in octave/src/ov.h There are a number of functions defined to | determine the data type. They are: | | [...] | | Then once you determine the correct type you can get it representation | with something like: | | ComplexRowVector = args(0).complex_row_vector_value(); Since there are automatic conversions that can happen, it is generally better to simply try to extract what you want, and then see if that works (i.e., check error_state). It is more flexible to do things this way because someone may later introduce a new data type that could work for you, but if you have only checked for a specific type, your code will fail to accept the new data type, even if it would make sense to do so. 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 -------------------------------------------------------------