From help-octave-request at bevo dot che dot wisc dot edu Fri Dec 20 04:07:50 2002 Subject: Re: Hi, another newbie ... From: "Andrzej M. Ostruszka" To: help-octave at bevo dot che dot wisc dot edu Date: Fri, 20 Dec 2002 11:07:09 +0100 On Thu, Dec 19 (2002), Paul Kienzle wrote: > Yes. You will need to make an octave value list for you input parameters > and your returned parameters will be in an octave_value_list so it is a > little bit ugly but not too difficult. I figured that out by myself :), I have only small suggestion to remove constructors for octave_value_list other than with octave_value since there's ambiguity below in append since it doesn't know which way to choose (via octave_value or octave_value_list) ... args.append(-1.); res = feval("...", args); ... > You can also call eval, which in some cases may be a little easier.. Could you elaborate a bit more on this? > Look in variables.cc for get/set_global_value. Code for symbols in the > current function will be similar except that it will use curr_sym_tab > instead of global_sym_tab. Thanks, I'll take a look on this. > > -lm -lg2c -lblas -llapack -lcruft -loctave -ldl -lfftw > > Do you have a small program you can share which reproduces the error? Sorry, it was problem of the order of these libraries during linking. There's still problem with `kpse_clear_dir_cache' missing in libkpathsea shipped in RedHat 7.3 but I guess this does not have anything to do with octave :). > > Additionally I'd like to access other octave functions > > (defined as *.m or *.oct or even builtin) but I guess that the answer > > for my first question also aswers that one. > > Once you are trying to call .m files you might as well use an oct file > since you have to have almost all the machinery of octave available to > do so. There are a few cases in which you might not want to do so, > such as when you need your own event loop, but to do that we need to > rework the octave toplevel code a bit. I'm not sure I understand the above. Do you suggest that the only possibility (or at least much more convenient than others) is to write main program in octave and call there external oct file instead of main program beeing written in C++? Best regards -- ____ _ ___ / | \_/ |/ _ \ Andrzej Marek Ostruszka / _ | | (_) | Instytut Fizyki, Uniwersytet Jagiellonski (Cracow) /_/ L|_|V|_|\___/ (PGP <-- finger ostruszk at order dot if dot uj dot edu dot pl) ------------------------------------------------------------- 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 -------------------------------------------------------------