[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exporting a variable to the global workspace from a C++ function
From: |
John W. Eaton |
Subject: |
Re: Exporting a variable to the global workspace from a C++ function |
Date: |
Wed, 12 Aug 2009 10:53:11 -0400 |
On 12-Aug-2009, Justin Bare wrote:
| I tried this as you suggested:
|
| symbol_table::global_varref("x") = 9;
| symbol_table::set_scope(symbol_table::top_scope);
| symbol_table::insert("x").mark_global();
|
| but I get compiler errors that say:
|
| readbuf.cpp:29: error: \x91global_varref\x92 is not a member of
\x91symbol_table\x92
| readbuf.cpp:30: error: \x91set_scope\x92 is not a member of
\x91symbol_table\x92
| readbuf.cpp:30: error: \x91top_scope\x92 is not a member of
\x91symbol_table\x92
| readbuf.cpp:31: error: \x91insert\x92 is not a member of
\x91symbol_table\x92
|
| even though I have included the Octave/C++ library
|
| How do I make this compile?
Your earlier method of using set_global_value was the right way to
install a global variable. But I think you are confused about how to
access globals from the interpreter prompt.
|
| > On Wed, Aug 12, 2009 at 2:59 PM, Justin
| > Bare<address@hidden> wrote:
| >> I tried the function you gave me in this way inside a C++ function:
| >>
- Exporting a variable to the global workspace from a C++ function, Justin Bare, 2009/08/11
- using save command, dastew, 2009/08/12
- Re: using save command, James Sherman Jr., 2009/08/12
- RE: using save command, dastew, 2009/08/12
- RE: using save command, dastew, 2009/08/13
- RE: using save command, macy, 2009/08/13
- RE: using save command, dastew, 2009/08/13
- RE: using save command, John W. Eaton, 2009/08/13
- RE: using save command, dastew, 2009/08/13