Next: Tool Invocation Function
Up: Primitives
Previous: Special Purpose Functions
  Contents
Type Manipulation Functions
t_text
_type_of(t_value v)
_type_of returns a text value corresponding to the type of the
value v as shown in Table A.9.
Table A.9:
Text values returned by the _type_of
primitive for each possible input value.
Value |
Text returned by _type_of |
true, false |
"t_bool" |
integer |
"t_int" |
byte sequence |
"t_text" |
err |
"t_err" |
list |
"t_list" |
binding |
"t_binding" |
closures |
"t_closure" |
|
t_bool
_same_type(t_value v1, t_value v2) =
operator==(_type_of(v1), _type_of(v2))
t_bool
_is_bool(t_value v)
Returns true if v is of type t_bool; returns
false otherwise.
t_bool
_is_int(t_value v)
Returns true if v is of type t_int; returns false
otherwise.
t_bool
_is_text(t_value v)
Returns true if v is of type t_text; returns
false otherwise.
t_bool
_is_err(t_value v)
Returns true if v is of type t_err; returns false
otherwise.
t_bool
_is_list(t_value v)
Returns true if v is of type t_list; returns
false otherwise.
t_bool
_is_binding(t_value v)
Returns true if v is of type t_binding; returns
false otherwise.
t_bool
_is_closure(t_value v)
Returns true if v is of type t_closure; returns
false otherwise.
Next: Tool Invocation Function
Up: Primitives
Previous: Special Purpose Functions
  Contents
Allan Heydon, Roy Levin, Timothy Mann, Yuan Yu