[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to call builtin functions
From: |
Ganesh Bikshandi |
Subject: |
Re: How to call builtin functions |
Date: |
Mon, 26 Jul 2004 11:00:05 -0500 |
Thanks. It worked. But it took me a while to figure out that I have to
call Frand instead of rand. What is the logic behind it? Just
curious.
Ganesh
On Mon, 26 Jul 2004 00:13:12 -0400, Paul Kienzle <address@hidden> wrote:
> Ganesh,
>
> Since you are running stand-alone, you don't need to go
> through octave to call functions. Instead you can call them
> directly. For the most part, the builtin functions are small
> wrappers around liboctave. For example, the file
> src/DLD-FUNCTIONS/rand.cc wraps the octave_rand
> class defined in liboctave/rand.h.
>
> That said, for rand I would grab randmtzig.c from
> octave-forge/FIXES since it is about 3x faster.
>
> - Paul
>
>
>
> On Jul 25, 2004, at 6:19 PM, Ganesh Bikshandi wrote:
>
> > Hi,
> >
> > I need to call builtin functions from a stand alone c++ (not a .oct
> > function) program. I tried calling a function (rand) using feval. But
> > for that I need to initialize the symbol table (fbi_sym_tab) and
> > install the builtin functions. Otherwise my program seg faults. I
> > allocated fbi_sym_tab and called install_builtins(), but I get lot of
> > warning, and the function (rand) was not installed. Hence, I get the
> > error message:
> >
> > error: feval: the symbol `rand' is not valid as a function
> >
> > 1. Can anyone, who had succeeded in calling a builtin function from a
> > standalone program, share with me the simplest way to install the
> > builtin functions?
> >
> > Ganesh
> >
>
>
-------------------------------------------------------------
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
-------------------------------------------------------------