help-octave
[Top][All Lists]
Advanced

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

Re: Need help on DLFs (dynamically linked functions)


From: John W. Eaton
Subject: Re: Need help on DLFs (dynamically linked functions)
Date: Mon, 22 Jun 1998 23:59:57 -0500 (CDT)

On 20-Jun-1998, Wonkoo Kim <address@hidden> wrote:

| > Date: Thu, 18 Jun 98 14:35:08 +0200
| > From: "Michael Hanke" <address@hidden>
| >
| > Have a look at my recently uploaded sample drivers for ode's in
| > octaves source repository.
| > Michael
| 
| This helped me quite a lot!  I successfully managed to convert my C
| function to Octave DLF.  (Matwrap package was too complex for my
| needs.)
| 
| Some quick questions:
| 
| (1) Should I define only one DLF (to be called from Octave) in a file?
|     (I noticed that Octave failed to load a DLF if the DLF name was 
|      not matched with its .oct file name, like with .m files.)

Some of Octave's .oct files define more than one function.  Multiple
links in the filesystem are then used to refer to the same .oct file
using more than one name.

| (2) What's the difference between x(1,1) and x.elem(1,1)?
|     Just additional bound checking for .elem?

The operator() version does bounds checking if Octave was compiled
with BOUNDS_CHECKING defined.  The elem() member function never does
bounds checking.  See Array.h for more details.

| (3) If I want to detect input vector type of either row or column
|     vector, should I treat the input arg as matrix?

Seems reasonable.

| (4) In Hanke's code (RADAU5.cc), I see lines: 
|         octave_value_list retval;
|     but retval was not assigned anywhere before "return retval;" 
|     lines.  Could you explain why?

I'm not sure exactly what function(s) you mean, but it has the effect
of returning an empty list.  If error_state has been set, the return
value doesn't much matter.

jwe



reply via email to

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