Next: Evaluating An Expression, Previous: Parsing An Expression, Up: Crash Introduction
Since the expression evaluator allows data types the expression itself has a defined type, which may one of the allowed proper data types or the special void type.
Determining the expression type (or the type to which it evaluates) can be done as:
type = x1f4_type_expression(x1f4_expression);
See x1f4_type_expression.
In this simple example no application defined types were introduces and thus
the type
variable can only have one of X1f4_E4_MODE
,
X1f4_E4_REAL
, X1f4_E4_TEXT
or X1f4_E4_VOID
values after
the x1f4_type_expression
function call. The values indicate
integer, real, string and the special no value
(void) types, correspondingly.
See Intrinsic Types.
See Symbolic Types.
Note that the C types correspoding the logical integer, real and
string types are defined as X1f4_E4_C_MODE
, X1f4_E4_C_REAL
and X1f4_E4_C_TEXT
.
See C Types.