Previous: iklib sentinel, Up: iklib [Index]
Compare the arguments as eq?
would do, but return a negated
result. Equivalent (but more efficient) to:
(not (eq? obj1 obj2))
Return true if obj is an immediate object: an object contained in a single machine word. Compound objects (like lists and vectors) are not immediate.
Return the void value. We should never use the void object as argument for a function application, because the only legitimate use of the void object is as single return value of functions returning “unspecified values” (under Vicare returning a single value is faster than returning zero values). If we need a unique value: we should use the sentinel value (see The sentinel object).
Return #t
if obj is the void value; otherwise return
#f
.
Always return #t
or #f
, ignoring the arguments.
These function are used by some syntaxes to check at run–time that an
expression returns a single value. If zero, two or more values are
returned: the built–in validation mechanism raises an exception at
run–time; otherwise the argument is returned or discarded and the
return value is #t
or #f
.
Given a string or symbol key, search among the internally installed libraries all the exported bindings having key as substring of their name and print a report to the standard output port. Useful when using the REPL. Example:
vicare> (apropos "-length") *** in library (vicare): (bitwise-length bytevector-length string-length struct-length vector-length) *** in library (rnrs): (bitwise-length bytevector-length string-length vector-length) *** in library (rnrs arithmetic bitwise): (bitwise-length) *** in library (rnrs base): (string-length vector-length) *** in library (rnrs bytevectors): (bytevector-length) *** in library (vicare): (bitwise-length bytevector-length string-length struct-length vector-length) vicare>
Interface to the C function getenv()
, (libc)getenv. Retrieve the value of environment variables.
variable must reference a string object representing the name of
the environment variable. If the environment variable is set: return a
string representing its value; else return false.
(getenv "PATH") ⇒ "/usr/local/bin:/usr/bin:/bin"
The Scheme level representation of environment variables names and
values is a string, but internally it is a bytevector; strings are
internally converted to bytevectors using string->utf8
.
Interface to the global C variable environ
, (libc)unsetenv. Retrieve the full environment. Return a list of
strings representing the contents of the environ
array; if the
environment is empty (no environment variables set) return nil.
Return a string describing the errno
code errno. Makes use
of the system function strerror()
. If errno is not a valid
errno
value: return a string telling it. As special cases
errno can be also #t
, meaning “unknown error”, and
#f
, meaning “no error”.
Similar to error
, but raise a continuable exception with
condition components: &warning
, &who
,
&message
, &irritants
.
Return a random fixnum object between zero (included) and fx (excluded). fx must be a strictly positive fixnum.
Contains null or a list of thunks to be evaluated by exit
whenever the process is normally terminated. Any exception raised by
the thunks is catched and discarded. To add an exit hook:
(define (do-something-at-exit) ---) (exit-hooks (cons do-something-at-exit (exit-hooks)))
Previous: iklib sentinel, Up: iklib [Index]