help-octave
[Top][All Lists]
Advanced

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

Re: global variables


From: Jaroslav Hajek
Subject: Re: global variables
Date: Tue, 15 Dec 2009 21:09:02 +0100

On Tue, Dec 15, 2009 at 3:05 PM, Naveen Garg <address@hidden> wrote:
>
>
> On Mon, Dec 14, 2009 at 10:46 PM, John W. Eaton <address@hidden> wrote:
>>
>> On 14-Dec-2009, Naveen Garg wrote:
>> | int parse_status;
>> | eval_string("global gvar", false, parse_status);
>> |
>> | I get:
>> |  error: eval: invalid use of statement list
>> |
>
>
>>
>> Why don't you avoid the eval and just use the set_global_variable
>> function?  That's what it is there for.
>>
> I could not find a "set_global_variable".
> I am already using set_global_value, but in order for me to have access to
> that value, i need to declare it global...
> http://www.gnu.org/software/octave/doc/interpreter/Global-Variables.html#Global-Variables
>
>
>> JH: be more specific
> I would like access to the physical octave_value stored in the symbol_record
> for the global variables, so they can be manipulated directly ( I am working
> with large stacks of 2dimages (3d images) and will run out of memory if I
> have to keep copying all the images across the c api).
>

This is doable through symbol_record::varref, which returns a
reference to octave_value.

>> provide detailed explanation, or (even better) send patches.
> Once I figure out how to use symbol_record::def() and
> symbol_record::define(), I will do it myself, and possibly submit a patch.
>

It seems you talk about the 3.0.x version. The symbol table has been
rewritten for 3.2.x. The 3.0.x branch is closed, so no more patches
will be applied. I suggest you work with 3.2.x or development version.

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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