% C Function: Type Function
Npt documentation.
Reference: ANSI Common Lisp npt
The following function specifications are described in lisp.h
.
int lisp_hold_p(addr x);
void lisp_hold_value(addr x, addr *ret);
void lisp_hold_set(addr x, addr value);
addr Lisp_holdv(addr x);
void lisp_hold(addr *ret, addr value);
addr Lisp_hold(void);
void lisp_nil(addr x);
void lisp_t(addr x);
addr Lisp_nil(void);
addr Lisp_t(void);
int lisp_nil_p(addr x);
int lisp_t_p(addr x);
int lisp_null_p(addr x);
int lisp_character_p(addr x);
int lisp_cons_p(addr x);
int lisp_list_p(addr x);
int lisp_string_p(addr x);
int lisp_symbol_p(addr x);
int lisp_strvect_p(addr x);
int lisp_array_p(addr x);
int lisp_vector_p(addr x);
int lisp_fixnum_p(addr x);
int lisp_bignum_p(addr x);
int lisp_integer_p(addr x);
int lisp_ratio_p(addr x);
int lisp_rational_p(addr x);
int lisp_single_float_p(addr x);
int lisp_double_float_p(addr x);
int lisp_long_float_p(addr x);
int lisp_float_p(addr x);
int lisp_real_p(addr x);
int lisp_complex_p(addr x);
int lisp_number_p(addr x);
int lisp_clos_p(addr x);
int lisp_hashtable_p(addr x);
int lisp_readtable_p(addr x);
int lisp_control_p(addr x);
int lisp_callname_p(addr x);
int lisp_function_p(addr x);
int lisp_package_p(addr x);
int lisp_random_state_p(addr x);
int lisp_pathname_p(addr x);
int lisp_stream_p(addr x);
int lisp_restart_p(addr x);
int lisp_environment_p(addr x);
int lisp_bitvector_p(addr x);
int lisp_print_dispatch_p(addr x);
Function of the hold variable.
int lisp_hold_p(addr x);
void lisp_hold_value(addr x, addr *ret);
void lisp_hold_set(addr x, addr value);
addr Lisp_holdv(addr x);
void lisp_hold(addr *ret, addr value);
addr Lisp_hold(void);
lisp_hold_p
int lisp_hold_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, non-zero is returned.
lisp_hold_value
void lisp_hold_value(addr x, addr *ret);
Input: x Object
Output: ret Object
If x
is a hold variable, the referenced object is returned to ret
.
If x
is not a hold variable, x
is returned to ret
as is.
lisp_hold_set
void lisp_hold_set(addr x, addr value);
Input: x Hold variable
Input: value Object
Stores the object in the x
hold variable.
If value
is a hold variable, the object held by value
is stored in x
.
Lisp_holdv
addr Lisp_holdv(addr x);
Input: x Object
Return: Object
Same as the function lisp_hold_value
, but returns an object.
If x
is a hold variable, the stored object is returned.
If x
is not a hold variable, the input is returned as is.
lisp_hold
void lisp_hold(addr *ret, addr value);
input: value Object
Output: ret Hold variable
Create a hold variable and store the value
and return it to ret
.
If value
is a hold variable, the value held by the function is used.
Lisp_hold
addr Lisp_hold(void);
Return: hold variable
Creates and returns a hold variable.
The value of the hold variable is NIL
.
Function of the boolean.
void lisp_nil(addr x);
void lisp_t(addr x);
addr Lisp_nil(void);
addr Lisp_t(void);
lisp_nil
void lisp_nil(addr x);
Output: x Hold variable
Store the nil
object in the x
hold variable.
lisp_t
void lisp_t(addr x);
Output: x Hold variable
Store the t
object in the x
hold variable.
Lisp_nil
addr Lisp_nil(void);
Return: nil
Return a nil
object.
Lisp_t
addr Lisp_t(void);
Return: t
Return a t
object.
Function of the system object.
int lisp_nil_p(addr x);
int lisp_t_p(addr x);
int lisp_null_p(addr x);
int lisp_character_p(addr x);
int lisp_cons_p(addr x);
int lisp_list_p(addr x);
int lisp_string_p(addr x);
int lisp_symbol_p(addr x);
int lisp_strvect_p(addr x);
int lisp_array_p(addr x);
int lisp_vector_p(addr x);
lisp_nil_p
int lisp_nil_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is nil
, a non-zero value is returned.
lisp_t_p
int lisp_t_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is t
, a non-zero value is returned.
lisp_null_p
int lisp_null_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is a NULL pointer, a non-zero pointer is returned.
The NULL pointer is the same as (void *)0
in C.
It is not the same as NIL
in Common Lisp.
lisp_character_p
int lisp_character_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is a character type, a non-zero value is returned.
lisp_cons_p
int lisp_cons_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is a cons, a non-zero value is returned.
lisp_list_p
int lisp_list_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is a list, a non-zero value is returned.
A list is a NIL
or cons.
lisp_string_p
int lisp_string_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is a string, a non-zero value is returned.
A string is an object of type LISPTYPE_STRING
or
a specialized array of one dimensional characters of type LISPTYPE_ARRAY
.
lisp_strvect_p
int lisp_strvect_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is LISPTYPE_STRING
type, a non-zero value is returned.
This is different from stringp
in Common Lisp.
lisp_symbol_p
int lisp_symbol_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is a symbol, a non-zero value is returned.
lisp_array_p
int lisp_array_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is LISPTYPE_ARRAY
type, a non-zero value is returned.
This is different from arrayp
in Common Lisp.
lisp_vector_p
int lisp_vector_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is LISPTYPE_VECTOR
type, a non-zero value is returned.
This is different from vectorp
in Common Lisp.
Function of the number object.
int lisp_fixnum_p(addr x);
int lisp_bignum_p(addr x);
int lisp_integer_p(addr x);
int lisp_ratio_p(addr x);
int lisp_rational_p(addr x);
int lisp_single_float_p(addr x);
int lisp_double_float_p(addr x);
int lisp_long_float_p(addr x);
int lisp_float_p(addr x);
int lisp_real_p(addr x);
int lisp_complex_p(addr x);
int lisp_number_p(addr x);
lisp_fixnum_p
int lisp_fixnum_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is LISPTYPE_FIXNUM
type, a non-zero value is returned.
This is not exactly the same as (typep x 'fixnum)
in Common Lisp,
but it is not different in normal use.
lisp_bignum_p
int lisp_bignum_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is LISPTYPE_BIGNUM
type, a non-zero value is returned.
lisp_integer_p
int lisp_integer_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is integer
type, a non-zero value is returned.
lisp_ratio_p
int lisp_ratio_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is ratio
type, a non-zero value is returned.
lisp_rational_p
int lisp_rational_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is rational
type, a non-zero value is returned.
lisp_single_float_p
int lisp_single_float_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is single-float
type, a non-zero value is returned.
lisp_double_float_p
int lisp_double_float_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is double-float
type, a non-zero value is returned.
lisp_long_float_p
int lisp_long_float_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is long-float
type, a non-zero value is returned.
lisp_float_p
int lisp_float_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is float
type, a non-zero value is returned.
lisp_real_p
int lisp_real_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is real
type, a non-zero value is returned.
lisp_complex_p
int lisp_complex_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is complex
type, a non-zero value is returned.
lisp_number_p
int lisp_number_p(addr x);
Input: x Object
Return: boolean
If x
is a hold variable, the value held by the variable is evaluated.
If x
is number
type, a non-zero value is returned.