uf_mom.h (²é¿´Ô´´úÂë)
¸ÅÊö
This module is designed to be used primarily in the code that is in the
function called by the Event Handler via MOM_run_user_function. It allows that
code to access the interpreter from which MOM_run_user_function was called. The
code can perform functions like asking and setting variables in the interpreter
and extending the interpreter with new functions. It can also be used with
CAM Exits that are associated with a TCL interpreter.
NOTE: Any function that sets a variable in the TCL interpreter, e.g., MOM_set_double,
sets the variable as a global variable. Therefore, in order to use its
value inside of a TCL proc you must declare that variable as "global"
in the proc. For example, if you call
UF_MOM_set_double( mom_id, "my_var", 1.23 );
it will be known as "mom_my_var" inside of every TCL proc and it will
be a global variable in every proc. So, e.g., to access it in
MOM_start_of_program you need
proc MOM_start_of_program {
global mom_my_var
...
}