[ctx_app.h] Current Program Context

contents



#include "ctx_dfn.h"




current context: Set & Get

CTX_T CTX_ctx_val(void)
the current context
void CTX_ctx_set(CTX_T ctx)
make 'ctx' the current context


current context: Eval


The following functions define the program interface to their context variables.
Abs_T CTX_eval(c_string Name, c_bool Index)
#define CTX_EVAL(typ,name)  ABS_CAST(typ,CTX_eval(name,C_False))
#define CTX_INDEX(name)     ((long)(CTX_eval(name,C_True)))
'Index' --> finds index of 'Name' in context; (-1) if missing
otherwise --> finds value of 'Name' in context; the program aborts if missing

int CTX_argcnt(void)
number of variable arguments
Abs_T CTX_argval(int idx)
#define CTX_ARGVAL(typ,idx) ABS_CAST(typ,CTX_argval(idx))
variable argument, indexed by 'idx'