[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
global variables
From: |
John W. Eaton |
Subject: |
global variables |
Date: |
Mon, 14 Dec 2009 23:46:26 -0500 |
On 14-Dec-2009, Naveen Garg wrote:
| I am trying to declare global variables from c.
| However, the following fails:
|
| int parse_status;
| eval_string("global gvar", false, parse_status);
|
| I get:
| error: eval: invalid use of statement list
|
| It seems to work if i put
| global gvar
| in a file called file.m
| and then run
| int parse_status;
| eval_string(source("file.m"), false, parse_status);
Why don't you avoid the eval and just use the set_global_variable
function? That's what it is there for.
| Also, is there something akin to set_local_value (similar to
| set_global_value)?
No. Why should there be a function like this?
jwe