Next: Global Constants
Up: Scheme Values and Types
Previous: Scheme Values and Types
The following are the Scheme_Type values for the standard types:
- scheme_char_type -- SCHEME_CHAR_VAL extracts the character;
test for this type with SCHEME_CHARP
- scheme_integer_type -- fixnum integers, which are
identified via the tag bit rather than following a pointer to this
Scheme_Type value; SCHEME_INT_VAL extracts the
integer; test for this type with SCHEME_INTP
- scheme_double_type -- flonum inexact numbers;
SCHEME_FLOAT_VAL or SCHEME_DBL_VAL extracts the floating-point
value; test for this type with SCHEME_DBLP
- scheme_float_type -- single-precision flonum inexact numbers, when
specifically enabled when compiling MzScheme; SCHEME_FLOAT_VAL or
SCHEME_FLT_VAL extracts the floating-point value; test for this type
with SCHEME_FLTP
- scheme_bignum_type -- test for this type with SCHEME_BIGNUMP
- scheme_rational_type -- test for this type with SCHEME_RATIONALP
- scheme_complex_type -- test for this type with SCHEME_COMPLEXP
- scheme_string_type -- SCHEME_STR_VAL extracts the string (which is
always null-terminated, but may also contain embedded nulls; the
Scheme string is modified if this string is modified) and
SCHEME_STRLEN_VAL extracts the string length (not counting the null terminator);
test for this type with SCHEME_STRINGP
- scheme_symbol_type -- SCHEME_SYM_VAL extracts the string
(do not modify this string);
test for this type with SCHEME_SYMBOLP
- scheme_box_type -- SCHEME_BOX_VAL extracts/sets the boxed
value; test for this type with SCHEME_BOXP
- scheme_pair_type -- SCHEME_CAR extracts/sets the car
and SCHEME_CDR extracts/sets the cdr;
test for this type with SCHEME_PAIRP
- scheme_vector_type -- SCHEME_VEC_SIZE extracts the length
and SCHEME_VEC_ELS extracts the array or Scheme values
(the Scheme vector is modified when this array is modified);
test for this type with SCHEME_VECTORP
- scheme_type_symbol_type -- SCHEME_TSYM_VAL extracts the symbol;
test for this type with SCHEME_TSYMBOLP
- scheme_object_type -- SCHEME_OBJ_CLASS extracts the class,
SCHEME_OBJ_DATA extracts/sets the user pointer, and
SCHEME_OBJ_FLAG extracts/sets the flag;
test for this type with SCHEME_OBJP
- scheme_class_type -- test for this type with SCHEME_CLASSP
- scheme_interface_type -- test for this type with SCHEME_INTERFACEP
- scheme_structure_type -- structure instances; test for this type with SCHEME_STRUCTP
- scheme_struct_type_type -- structure types; test for this type with SCHEME_STRUCT_TYPEP
- scheme_unit_type -- test for this type with SCHEME_UNITP
- scheme_input_port_type -- SCHEME_INPORT_VAL extracts/sets
the user data pointer; test for this type with SCHEME_INPORTP
- scheme_output_port_type -- SCHEME_OUTPORT_VAL extracts/sets
the user data pointer; test for this type with SCHEME_OUTPORTP
- scheme_promise_type -- test for this type with SCHEME_PROMP
- scheme_process_type -- thread descriptors; test for this type with SCHEME_PROCESSP
- scheme_sema_type -- semaphores; test for this type with SCHEME_SEMAP
- scheme_hash_table_type -- test for this type with SCHEME_HASHTP
- scheme_weak_box_type -- test for this type with SCHEME_WEAKP; SCHEME_WEAK_PTR extracts
the contained object, or NULL after the content is collected; do not set
the content of a weak box
- scheme_generic_data_type -- data analogous to a generic procedure created
with make-generic; test for this type with SCHEME_GENDATAP
- scheme_namespace_type -- namespaces; test for this type with SCHEME_NAMESPACEP
- scheme_config_type -- parameterizations; test for this type with SCHEME_CONFIGP
The following are the procedure types:
- scheme_prim_type -- a primitive procedure
- scheme_closed_prim_type -- a primitive procedure with a data pointer
- scheme_compiled_closure_type -- a Scheme procedure
- scheme_cont_type -- a continuation
- scheme_escaping_cont_type -- an escape continuation
- scheme_case_closure_type -- a case-lambda procedure
The predicate SCHEME_PROCP returns 1 for all procedure types and
0 for anything else.
The following are additional number predicates:
- SCHEME_NUMBERP -- all
numerical types
- SCHEME_REALP -- all
non-complex numerical types
- SCHEME_EXACT_INTEGERP --
fixnums and bignums
- SCHEME_EXACT_REALP --
fixnums, bignums, and rationals
- SCHEME_FLOATP --
both single-precision (when enabled) and double-precision flonums
Next: Global Constants
Up: Scheme Values and Types
Previous: Scheme Values and Types
PLT