Go to the previous, next section.
void, char, short, int,
int16, int32, int64, long, unsigned,
unsigned16, unsigned32, unsigned64, float,
float64 and double.
The type modifers const and
volatile can be applied to any of the types.
type_node * tn = block::parse_type("const int");
Composite types can be created for pointers, arrays, functions, structures and unions.
*' following the base type.
type_node * tn = block::parse_type("const char *");
type_node * tn = block::parse_type("char * [100][100]");
type_node * tn = block::parse_type("int (const char *, int, int)");
type_node * tn = block::parse_type(" struct { double real;
double imag }");
parse_type call or by providing the
type id in the string. For example,
type_node * t1;
type_node * t2;
type_node * r;
r = block::parse_type("%% * (%34, %%)", t1, t2);
The type node r will be of a function type of a function that
returns a value of the type given by the type node t1. This function
type has two arguments; the type with id number 34 is the first argument
and the type given by type node t2 is the second argument.
Most of the combinations of the base types that are valid in C can be
used within the builder type system.
See section Defining Variables and Generating New Type Definitions for exact definitions for the
parse_type() function.
Go to the previous, next section.