[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The libfreem
API uses a struct
of type freem_ref_t
in order to communicate state, pass in values, and return results.
The data structure, defined in ‘freem.h’, looks like this:
typedef struct freem_ref_t { /* * The 'reftype' field can be one of: * * MREF_RT_LOCAL * MREF_RT_GLOBAL * MREF_RT_SSV */ short reftype; /* * The 'name' field is the name of the local variable, * global variable, or SSVN (without ^ or ^$). */ char name[256]; /* * Returned data goes in a string, so you've got to figure out the * whole M canonical number thing yourself. Good luck. :-) */ char value[STRLEN]; short status; unsigned int subscript_count; char subscripts[255][256]; } freem_ref_t;
freem_ref_t Members
The ‘reftype’ member determines whether we are operating on a local variable, a global variable, or a structured system variable. It may be set to any of following constants: MREF_RT_LOCAL
, MREF_RT_GLOBAL
, or MREF_RT_SSV
.
The ‘name’ member contains the name of the global, local, or SSVN to be accessed. You must not include leading characters, such as ^
or ^$
.
This member contains the value read from or the value to be written to the global, local, or SSVN.
This member gives us various API status values after the API call returns. In general, this value is also returned by each API function.
The number of subscripts to be passed into the API function being called. This value represents the maximum index into the first dimension of the subscripts
array.
A two-dimensional array containing the subscripts to which we are referring in this API call.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on September 20, 2023 using texi2html 5.0.