ason_inspect man page

ason_check_represented_in, ason_check_equal, ason_type, ason_long, ason_double, ason_string — Inspect various properties of ASON values.

Synopsis

#include <ason/ason.h>

int ason_check_represented_in(ason_t *a, ason_t *b);
int ason_check_equal(ason_t *a, ason_t *b);

ason_type_t ason_type(ason_t *a);
long long ason_long(ason_t *a);
double ason_double(ason_t *a);
char *ason_string(ason_t *a);

Description

ason_check_represented_in is used to check whether the ASON value in a is represented in b.

ason_check_equal is used to check whether two ASON values are equal.

ason_type returns the type of the ASON value in a. See ason_values(3).

ason_long, and ason_double return the numerical values of numerical ASON values as a C long long or C double respectively.

ason_string returns the C string value of an ASON string value. The returned value is a new string which must be freed with free (3).

Return Value

ason_check_represented_in and ason_check_equal return nonzero if the condition they check for is true.

ason_type returns the appropriate ason_type_t constant. See ason_values (3).

ason_long and ason_double return the appropriate long long or double value.

ason_string returns a new string which must be freed by the caller.

Note that ason_long, ason_double, and ason_string will abort if they are used on a value which cannot be converted to the appropriate type. You MUST check the type of the argument with ason_type before calling.

See Also

ason(3) ason_values(3)

Author

Casey Dahlin <casey.dahlin@gmail.com>

Referenced By

ason(3).

JANUARY 2014 Linux User Manuals