help-octave
[Top][All Lists]
Advanced

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

Re: assignin from Oct file


From: Jordi Gutiérrez Hermoso
Subject: Re: assignin from Oct file
Date: Thu, 14 Feb 2013 12:10:35 -0500

On 14 February 2013 11:38, Julien Salort <address@hidden> wrote:
> What is the preferred way to assign variables in the caller scope from
> an Oct file ?

There isn't such a preferred way. On the dev version you can directly
call DEFUNs if you #include "builtin-defun-decls.h", but that's very
new.

> Would it be an acceptable practise to use feval to call assignin ?

Yes, this is the only way if you absolutely must use an oct file (or
you'll have to duplicate some or most of the code in the assignin
DEFUN). However, consider if you really need to do all of your work in
the oct file. It's usually easier to do most of the argument parsing
and checking in an m-file, and then just define some
__internal_fast_function__ in the oct file. You don't need to write
everything in C++.

- Jordi G. H.


reply via email to

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