Next: Symbol Table Access, Previous: Requesting Values, Up: Extension API Description [Contents][Index]
Two functions give you access to the arguments (parameters) passed to your extension function. They are:
awk_bool_t get_argument(size_t count,
awk_valtype_t wanted,
awk_value_t *result);
awk_value_t
structure pointed to by result
with the count
th argument. Return true if the actual type matches wanted
, and false otherwise. In the latter case, result->val_type
indicates the actual type (see Table 17.2). Counts are zero-based—the first argument is numbered zero, the second one, and so on. wanted
indicates the type of value expected.awk_bool_t set_argument(size_t count, awk_array_t array);
count
is too big, or if the argument’s type is not undefined. See section Array Manipulation for more information on creating arrays.