[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .oct-files/ library-wrapper

From: John W. Eaton
Subject: Re: .oct-files/ library-wrapper
Date: Fri, 19 Jan 2001 10:35:38 -0600

On 19-Jan-2001, Ben Sapp <address@hidden> 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.


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]