help-octave
[Top][All Lists]
Advanced

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

Re: accessing the calling environment from within a function


From: Paul Kienzle
Subject: Re: accessing the calling environment from within a function
Date: Fri, 10 Dec 2004 19:59:49 -0500

The categorical index is handy:

        http://octave.sourceforge.net/index

evalin/assignin are mentioned in >Programming >Interpreter Interface

- Paul

On Dec 10, 2004, at 11:49 AM, Paul Laub wrote:

Dear Paul,

Your suggestion works great ... and is less filling too! Thanks!

I wonder what other undocumented goodies lurk in Octave.

Paul Laub

On Thu, 9 Dec 2004 21:14:54 -0500, Paul Kienzle <address@hidden> wrote:
evalin('caller','code')
assignin('caller','variable','value')

        - Paul



On Dec 8, 2004, at 11:16 AM, Paul Laub wrote:

Dear all,

How can I create a function able to access any or all of the
variables in the namespace (or scope) of the calling
environment. I'd like to do this without passing all
of the variables via the arg list and without explicitly
marking all variables as global.

One workaround, I suppose, is to use a script rather
than a function. But is there any way to invoke a
script in a function-like way, that is, with an
argument list? The best I can do is have the script
interactively request names of arguments using input().
However, I'd like to avoid such interactivity.

Currently I am using Octave 2.1.57 without the forge
extensions.

Sincerely,

Paul Laub




--

Job Classification Title: Slack-jawed Troglodyte
Safe Harbor Disclaimer: "Elvis has left the building."



-------------------------------------------------------------
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
-------------------------------------------------------------




-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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