Returns a text string which indicates the type of the argument.
Type of v | Text returned by _type_of |
bool | "t_bool" |
int | "t_int" |
text | "t_text" |
err | "t_err" |
list | "t_list" |
binding | "t_binding" |
function | "t_closure" |
_type_of(FALSE) == "t_bool" _type_of(1234) == "t_int" _type_of("The fox jumped over the lazy dog.") == "t_text" _type_of(<1,2,3,"foo","bar">) == "t_list" _type_of([ foo = 1 ]) == "t_binding" _type_of(ERR) == "t_err" foo() { //... }; _type_of(foo) == "t_closure" |
Returns TRUE if the type of v1 is the same as the type of v2 and FALSE otherwise.
_same_type(FALSE, TRUE) == TRUE _same_type(1, 7) == TRUE _same_type("foo", "bar") == TRUE _same_type([ foo = 1 ], [ bar = <1,2,3> ]) == TRUE _same_type(<1,2,3>, <"foo","bar">) == TRUE foo() { //... }; bar() { // ... }; _same_type(foo, bar) == TRUE _same_type(FALSE, 3) == FALSE _same_type(1, "foo") == FALSE _same_type("bar", [ foo = 1 ]) == FALSE _same_type([ foo = 1 ], <1,2,3>) == FALSE |