<=
|
(<= x y) Returns true if x is numerically less than or equal to y.
|
<
|
(< x y) Returns true if x is numerically less than y.
|
=
|
(= x y) Returns true if x is numerically equal to y.
|
>=
|
(>= x y) Returns true if x is numerically greater than or equal to y.
|
>
|
(> x y) Returns true if x is numerically greater than y.
|
-
|
(- x1 x2 ...) With one argument returns the negation, returns the difference of the first argument and the sum of the rest.
|
/
|
(/ x1 x2 ...) With one argument returns the inverse, otherwise returns the quotient of the first argument and the product of the rest.
|
*
|
|
+
|
(+ x1 x2 ...) Returns the sum of its arguments.
|
abs
|
(abs x) Returns the absolute numerical value of x.
|
acos
|
(acos x) Returns the inverse cosine of x.
|
allocate-heap
|
(allocate-heap) Attempts to allocate (call the C library malloc procedure) to obtain an additional heap. The size of the heap and the maximum number of heaps are determined at startup time. Returns non-null if successful.
|
and
|
(and form1 form2 form3 ...) A special form which causes the evaluation of its subforms in order, from left to right, continuing if and only if the subform returns a non-null value.
|
append
|
(append l1 l2 l3 l4 ...) Returns a list which the result of appending all of its arguments. Example: (append '(a b) '(c d)) => (a b c d)
|
append2
|
|
apply
|
(apply function arglist) Applies the function to the argument list arglist.
|
apropos
|
(apropos substring) Returns a list of all symbols containing the given substring.
|
aref
|
(aref array index) Returns the element of the array at the given index.
|
array->hexstr
|
(array->hexstr string) Takes a string or byte array and returns a string in representing the values of the elements in hex.
|
aset
|
(aset array index value) Stores the value at the given index in the array.
|
ash
|
(ash value bits) Arithmetic shift of value a given number of bits to the left (positive) or right (negative).
|
asin
|
(asin x) Returns the inverse sin of x.
|
ass
|
(ass key alist function) Returns the first element of the alist such that the function applied to car of the element and the key returns a non-null value. For example: (define (assq x alist) (ass x alist eq?))
|
assoc
|
(assoc key alist) Same as (ass key alist equal?).
|
assq
|
(assq key alist) Same as (ass key alist eq?).
|
assv
|
(assv key alist) Same as (ass key alist eql?).
|
atan
|
(atan x) Returns the inverse tagent of x.
|
atan2
|
(atan2 x y) Returns the inverse tagent of x/y.
|
base64decode
|
(base64decode x) Given a string X in base64 representation returns a string with bytes computed using the base64 decoding algorithm. See rfc1521.htm.
|
base64encode
|
(base64encode x) Returns a string computed using the base64 encoding algorithm. (begin form1 form2 ...) A special form which evaluates each of its subforms one after another, returning the value of the last subform.
|
begin
|
|
benchmark-eval
|
(benchmark-eval nloops exp env) A zero-overhead way of evaluating the exp n times.
|
benchmark-funcall1
|
(benchmark-funcall1 nloops f arg1) A zero-overhead way of calling the function f n times on arg1.
|
benchmark-funcall2
|
(benchmark-funcall2 nloops f arg1 arg2) A zero-overhead way of calling the function f n times on arg1 and arg2.
|
bit-and
|
(bit-and x y) Returns the bitwise logical "and" (C language & operator) of numerical arguments x and y.
|
bit-not
|
(bit-not x) Returns the bitwise logical complement (C language ~ operator) of numerical argument x.
|
bit-or
|
(bit-or x y) Returns the bitwise logical "or" (C language | operator) of numerical arguments x and y.
|
bit-xor
|
(bit-xor x y) Returns the bitwise logical "xor" (C language ^ operator) of numerical arguments x and y.
|
butlast
|
(butlast x) Returns a new list which has all the elements of the argument x except for the last element.
|
bytes-append
|
(bytes-append x1 x2 ...) Returns a new byte array by appending its arguments which may be strings or byte arrays.
|
caaar
|
(caaar x) Same as (car (car (car x))).
|
caadr
|
(caadr x) Same as (car (car (cdr x))).
|
caar
|
(caar x) Same as (car (car x)).
|
cadar
|
(cadar x) Same as (car (cdr (car x))).
|
caddr
|
(caddr x) Same as (car (cdr (cdr x))).
|
cadr
|
(cadr x) Same as (car (cdr x)).
|
car
|
(car x) If x is the result of (cons a b) then (car x) is the same as a.
|
*catch
|
|
cdaar
|
(cdaar x) Same as (cdr (car (car x))).
|
cdadr
|
(cdadr x) Same as (cdr (car (cdr x))).
|
cdar
|
(cdar x) Same as (cdr (car x)).
|
cddar
|
(cddar x) Same as (cdr (cdr (car x))).
|
cdddr
|
(cdddr x) Same as (cdr (cdr (cdr x))).
|
cddr
|
(cddr x) Same as (cdr (cdr x)).
|
cdr
|
(cdr x) If x is the result of (cons a b) then (cdr x) is the same as b.
|
%%closure
|
|
%%closure-code
|
|
%%closure-env
|
|
cond
|
(cond clause1 clause2 ...) A special form where each clause is processed until the predicate expression of the clause evaluates true. Then each subform in the predicate is evaluated with the value of the last one becoming the value of the cond form: (predicate-expression form1 form2 ...)
|
cons
|
(cons x y) Allocates a list object with x as the car and y as the cdr. For example: (cons 1 (cons 2 (cons 3 ()))) evaluates to (1 2 3)
|
cons-array
|
(cons-array dimension kind) Allocates an array (currently limited to one dimension). The kind may be string, byte, double, or lisp (default).
|
copy-list
|
(copy-list x) The toplevel cons objects of x are copied, returning a new list.
|
cos
|
(cos x) Returns the cosine where x is in units of radians.
|
define
|
(define subform1 subform2) A special form used to assign a value to a variable in one of two ways: (define variable value) or to create a procedure (define (procedure-name arg1 arg2 ...) form1 form2 ...)
|
delq
|
(delq element list) Deletes the elements of the list which are eq to its first argument. Possibly modifying the list using the set-cdr! operation.
|
env-lookup
|
(env-lookup indentifier environment) Returns an object such that the car is the location where the value of identifier is stored.
|
eof-val
|
(eof-val) Returns the object returned by read upon encountering and end of file condition.
|
eq?
|
(eq? x y) Returns true if x and y are the same object.
|
equal?
|
(equal? x y) Returns true if x and y are equal objects.
|
eqv?
|
(eqv? x y) Returns true if x and y are the same object or numerically equal.
|
error
|
(error message object) Prints the error message then aborts the current execution by invoking *throw using the symbol errobj as the tag and the cons of the message and the object as the value. Equivalent to: (define (error message object) (if (> (verbose 0)) (writes nil "ERROR: " message "\n")) (set! errobj object) (*throw 'errobj (cons message object))) errobj: This variable is assigned to the offending object when the error procedure has been invoked. Useful mainly during interactive debugging.
|
eval
|
(eval expression environment) Evaluates the expression in the context of the environment. This is not a special form. For example: (eval (read-from-string "(+ 1 2)")) evaluates to 3.
|
exp
|
(exp x) Computes the exponential function of x.
|
fast-load
|
(fast-load path noeval-flag) Loads a file of binary format expressions, if noeval-flag is true returns a list of the forms instead of evaluating them.
|
fast-print
|
(fast-print object state) Outputs a fast (binary) format representation of object, where the state is a list of (file hash-array index).
|
fast-read
|
(fast-read state) Inputs a form which had been output in fast (binary) format.
|
fast-save
|
(fast-save filename forms nohash-flag comment-string) Creates a file by using fast-print to output each of the forms. A true value for the nohash-flag will cause symbol names to be output each time they are encountered. Otherwise a more optimal index representation is used. The comment-string is used as the first line of data in the file.
|
fclose
|
(fclose stream) Closes the open file stream. U.
|
fflush
|
(fflush stream) See U.
|
fmod
|
(fmod x y) Floating point mod. U.
|
fopen
|
(fopen path mode) Opens the file and returns a file stream. U.
|
fread
|
(fread size-or-buffer stream) Returns a new string of size bytes by calling fread U. Or uses the buffer (a string or a byte array) instead and returns the number of bytes read. Returns () on end-of-file.
|
fseek
|
(fseek file offset direction) The direction is SEEK_CUR, SEEK_END or SEEK_SET. U.
|
ftell
|
(ftell stream) Calls ftell U to return the current offset into a file.
|
fwrite
|
(fwrite data stream) Write the data, a string or byte-array to the stream. Or data can also be a list of a string or byte-array and a numerical length.
|
gc
|
(gc) Invokes the garbage collector.
|
gc-info
|
(gc-info item) Item Value 0 true if copying gc, false if mark and sweek 1 number of active heaps 2 maximum number of heaps 3 number of objects per heap 4 amount of consing of objects before next gc
|
gc-status
|
(gc-status [flag]) If flag is not specified prints information about the gc. Otherwise flag can be used to turn on or off gc messages or turn on or off the gc itself when in stop and copy mode.
|
get
|
(get object key) Returns the key property of the object.
|
getc
|
(getc stream) Reads a character from the stream, returns () for end of file. U.
|
help
|
|
hexstr->bytes
|
|
href
|
|
hset
|
|
if
|
(if predicate-form true-form false-form) A special form that evaluates the true-form or the false-form depending on the result of evaluating the predicate form.
|
intern
|
(intern str) Looks up a string in the symbol table or enters a new symbol.
|
lambda
|
(lambda (arg1 arg2 ...) form1 form2 ...) Returns an applicable procedure object (CLOSURE) with the given argument list and expression subforms. For example: (mapcar (lambda (x) (* x x)) '(1 2 3)) evaluates to: (1 4 9) Also used by the define special form.
|
larg-default
|
(larg-default list index default-value) Reference the list according to index, but skipping over strings that begin with a colon or a dash. If the list is not long enough it returns the default-value instead. Most useful when used with the *args* variable inside a main program.
|
last
|
(last list) Returns the last cons in a list.
|
last-c-error
|
(last-c-error) Returns the value of the C library strerror(errno) U interned as a symbol.
|
length
|
(length object) Returns the length of an object which may be a string (acts like strlen) or a list, or an array.
|
let-internal ??
|
|
let-internal-macro
|
(let (binding1 binding2 ...) form1 form2 ...) A special form where each binding is a (variable value) pair. It works by computing the values, establishing the bindings, and then evaluating the forms, returning the value of the last one. For example the following evaluates to 30: (let ((x 10) (y 20)) (+ x y))
|
let*-macro
|
(let* (binding1 binding2 ...) form1 form2 ...) A special form where each binding is a (variable value) pair. It works by sequentially computing each value and then establishing a binding. For example the following evaluates to 30: (let* ((x 10) (y (+ x 10))) (+ x y))
|
Letrec-macro
|
(letrec (binding1 binding2 ...) form1 form2 ...) Useful when the value forms of the bindings are lambda expressions with which you desire to program mutually recursive calls.
|
list
|
(list item1 item2 ...) Conses up its arguments into a list.
|
lkey-default
|
(lkey-default list index default-value) Returns the substring on the right hand size of the equal sign of the first element of the list of the form index=value, or the default-value if none are found. Useful when processing the *args* value inside a main program.
|
load
|
(load fname noeval-flag search-flag) If search-flag is true it looks for fname in the current directory and then in the SIOD_LIB directory. The forms from the file are parsed according to the "parser:xxx" directive at the begining of the file (default "parser:read"). If the neval-flag is true then a list of the forms is returned otherwise the forms are evaluated.
|
log
|
(log x) Computes the natural logarithm of x.
|
lref-default
|
(lref-default list index default-fcn) Returns the index element of the list or the result of calling the default-fcn if the list is not long enough.
|
make-list
|
(make-list length element) Creates a list of the given length filled with the element specified.
|
mapcar
|
(mapcar fcn list1 list2 ...) Returns a list which is the result of applying the fcn to the elements of each of the lists specified.
|
mapcar1
|
|
mapcar2
|
|
max
|
(max x1 x2 ...) Returns the maximum of x1, x2, etc.
|
member
|
(member key list) Returns the portion of the list where the car is equal to the key, or () if none found.
|
memq
|
(memq key list) Returns the portion of the list where the car is eq to the key, or () if none found.
|
memv
|
(memv key list) Returns the portion of the list where the car is eqv? to the key, or () if none found.
|
min
|
(min x1 x2 ...) Returns the numerical minimum of its arguments.
|
nconc
|
(nconc l1 l2) Makes the cdr of the last cons of l1 point to l2.
|
not
|
(not x) Returns the reverse truth sense of x.
|
nreverse
|
(nreverse list) Destructive reversal of the elements of a list using set-cdr!.
|
nth
|
(nth index list) Reference the list using index, with the first element being index 0.
|
null?
|
(null? x) Returns true of x is the empty list.
|
number?
|
(number? x) Returns true of x is a number.
|
number->string
|
(number->string x base width precision) Formats the number according to the base, which may be 8, 10, 16 or the symbol e or f. The width and precision are both optional.
|
or
|
(or form1 form2 ...) A special form which causes the evaluation of its subforms in order, from left to right until a form evaluates to a non-null value.
|
pair?
|
(pair? x) Returns true if x is a pair (created by cons).
|
parse-number
|
(parse-number str) Convers a string to a number.
|
parser_fasl
|
|
parser_fasl_hook
|
|
parser_read
|
|
pow
|
(pow x y) Computes the result of x raised to the y power.
|
prin1
|
(prin1 object stream) Outputs the standard readable representation of the object to the stream, which defaults to the standard output.
|
print
|
(print object stream) Same as prin1 followed by output of a newline.
|
print-to-string
|
(print-to-string object string no-trunc-flag) Puts the readable representation of the object into the string, starting at the first character unless the no-trunc-flag is true, in which case the representation starts at the current length of the string.
|
prog1
|
(prog1 form1 form2 form3 ...) A special form which evaluates all its subforms but returns the value of the first one. A useful shorthand to employ instead of using a let.
|
putc
|
(putc char stream) Outputs the character to the stream. U.
|
putprop
|
(putprop object value key) color="#ff00ff"> Not implemented.
|
puts
|
(puts string stream) Outputs the string to the stream. U.
|
qsort
|
(qsort list predicate-fcn access-fcn) Implements the recursive quicksort algorithm on elements of the list compared by using the predicate-fcn on the results of invoking the access-fcn. Example Result (qsort '(3 1 5 4 2) <)(1 2 3 4 5) (qsort '((3 a) (2 b)) < car)((2 b) (3 a))
|
quit
|
(quit) Cause the read-eval-print loop to return, usually resulting in an exit from the main program of siod, but may not when other C programs are utilizing the libsiod functionality.
|
quote
|
(quote x) A special form that returns x without evaluating it. Commonly written in abbreviated format as 'x.
|
rand
|
(rand modulus) Computes a random number from 0 to modulus-1. Uses C library rand.
|
read
|
(read stream) Inputs characters from the stream returns the parsed standard expression, or (eof-val).
|
read-from-string
|
(read-from-string string) Performs a read operation on the characters in the string.
|
realtime
|
(realtime) Returns a double precision floating point value representation of the current realtime number of seconds. Usually precise to about a thousandth of a second.
|
regcomp
|
|
regerror
|
|
regexec
|
|
require
|
(require path) Computes a variable name by concatenating "*" + path + "-loaded*" and then calling (load path nil t) if and only if the variable is not bound to true. After the file is loaded the variable is set to true. This is the correct way of making sure a file is only loaded once.
|
reverse
|
(reverse x) Returns a new list which has elements in the reverse order of the list x.
|
runtime
|
(runtime) Returns a list of containing the current cpu usage in seconds and the subsetamount of cpu time that was spent performing garbage collection during the currently extant read-eval-print loop cycle.
|
save-forms
|
(save-forms filename forms how) Prints the forms to the file, where how can be "w" (default) or "a" to append to the file.
|
set!
|
(set! variable value) A special form that evaluates the value subform to get a value, and then assigns the variable to the value.
|
set-car!
|
(set-car! cons-cell value) Changes the car of the cons-cell object to point to the value.
|
set-cdr!
|
(set-cdr! cons-cell value) Changes the cdr of the cons-cell object to point to the value.
|
set-eval-history
|
(set-eval-history length circular-flag) Creates a list of the specified length and establishes bindings for *eval-history-ptr* and *eval-history*. The list is circular if the flag is specified true. Try the following: (define (fib x) (if (< x 2) x (+ (fib (- x 1)) (fib (- x 2))))) (set-eval-history 200) (fib 10) (mapcar (lambda (x) (if (pair? x) (car x) x)) *eval-history*)
|
setprop
|
(setprop obj key value) color="#ff00ff"> Not implemented.
|
set-symbol-value!
|
(set-symbol-value! symbol value env) Finds the location of the value cell for the specified symbol in the environment env and sets the value.
|
sin
|
(sin x) Computes the sine function of the angle x in radians.
|
sqrt
|
(sqrt x) Compute the square root of x.
|
srand
|
(srand seed) Reset the algorithm seed for the rand function. U.
|
%%stack-limit
|
|
strbreakup
|
(strbreakup string sep) Return a list of the portions of string indicated by the separator. (strbreakup "x=y&z=3" "&") => ("x=y" "z=3")
|
strcat
|
(strcat str1 str2) Copies the string str2 into str1 starting at the current active end of str1, which is determined by the location of a 0 byte, calling error if there is not enough room left in str1. U.
|
strcmp
|
(strcmp str1 str2) Returns 0 if str1 and str2 are equal, or -1 if str1 is alphabetically less than str2 or 1 otherwise. U.
|
strcpy
|
(strcpy str1 str2) Copies str1 into str1 or calling error if there is not enough room. U.
|
strcspn
|
(strcspn str indicators) Returns the location of the first character in str which is found in the indicators set, returns the length of the string if none found. U.
|
string?
|
(string? x) Returns true if x is a string.
|
string-append
|
(string-append str1 str2 str3 ...) Returns a new string which contains the concatenation of all its string arguments.
|
string-dimension
|
(string-dimension str) Returns the maximum possible length of a string array.
|
string-downcase
|
(string-downcase str) Return a new string converting all the characters of str to lowercase.
|
string-length
|
(string-length str) Returns the active string length of str.
|
string-lessp
|
(string-lessp str1 str2) Return true if str1 is alphabetically less than str2.
|
string->number
|
(string->number str radix) Converts the string to a number assuming the specified radix.
|
string-search
|
(string-search key str) Locate the index of the key in the specified string. Returns () if not found.
|
string-trim
|
(string-trim str) Return a new string made by trimming whitespace from the left and right of the specified string.
|
string-trim-left
|
(string-trim-left str) Like string-trim but only the left hand side.
|
string-trim-right
|
(string-trim-right str) Like string-trim but only the right hand side.
|
string-upcase
|
(string-upcase str) Returns a new string with all the lowercase characters converted to uppercase.
|
strspn
|
(strspn str indicators) Returns the location of the first character in str which is not found in the indicators set, returns the length of the str if none found. For example: (define (string-trim-left x) (substring x (strspn x " \t"))) U.
|
subset
|
(subset pred-fcn list) Return the subset of the list such that the elements satisify the pred-fcn. For example: (subset number? '(1 b 2 c)) => (1 2)
|
substring
|
(substring str start end) Returns a new string made up of the part of str begining at start and terminating at end. In other words, the new string has a length of end - start.
|
substring-equal?
|
(substring-equal? str str2 start end) An efficient way to determine if the substring of str2 specified by start and end is equal to str1.
|
swrite
|
(swrite stream table form) This is the same as the write-smart-html procedure described in ftp://ftp.std.com/pub/gjc/www95-paper.html.
|
sxhash
|
(sxhash data modulus) Computes a recursive hash of the data with respect to the specified modulus.
|
symbol?
|
(symbol? x) Returns true if x is a symbol.
|
symbol-bound?
|
(symbol-bound? symbol env) Returns true if the symbol is bound in the environment.
|
symbolconc
|
(symbolconc arg1 arg2 ...) Slightly more efficient than calling intern on the result of using string-append on the arguments. This procedure actually predates the availability of the string data type in SIOD.
|
symbol-value
|
(symbol-value symbol env) Returns the value of the symbol in the environment.
|
tan
|
(tan x) Computes the tagent of the angle x specified in radians.
|
the-environment
|
(the-environment) A special form which returns the interpreter environment structure for the current lexical scope.
|
*throw
|
|
trace
|
(trace fcn1 fcn2 ...) Traces the specified interpreted procedures by modifying the closure objects.
|
trunc
|
(trunc x) Returns the integer portion of x.
|
typeof
|
(typeof x) Returns a symbol describing the type of the object x, or the integer type code.
|
unbreakupstr
|
(unbreakupstr list sep) The reverse of strbreakup. The following example saves a list of lists as a tab delimited spreadsheet: (define (save-spread-sheet filename data) (if (>= (verbose) 2) (writes nil ";; saving spread sheet " filename "\n")) (let ((result data) (f (and (not (equal? filename "-")) (fopen filename "w")))) (while result (writes f (unbreakupstr (car result) "\t") "\n") (set! result (cdr result))) (and f (fclose f))))
|
ungetc
|
(ungetc char stream) Puts the char back into the stream for the next call to getc.
|
untrace
|
(untrace fcn1 fcn2 ...) Untraces the specified procedures.
|
verbose
|
(verbose arg) Sets the verbosity level of SIOD to the specified level or returns the current level if not specified. Verbose Level Effect on System 0 No messages. 1 Error messages only. 2 Startup messages, prompts, and evaluation timing. 3 File loading and saving messages. 4 (default)Garbage collection messages. 5 display of data loaded from files and fetched from databases.
|
while
|
(while pred-form form1 form2 ...) If pred-form evaluates true it will evaluate all the other forms and then loop.
|
writes
|
(writes stream data1 data2 data3 ...) Outputs the data arguments to the stream without quoting strings or special characters.
|