Contents
LISP functions and Macros
Macros
'e::= (quote e).
#'e::= (function e).
- #(e...)::= an array of the specified expressions.
Forms are not strictly functions because they delay eavaluating there
arguments:
#xhdigits::= a hexadecimal number.
#\char::= the ASCII code of the character.
Forms
- definition::="(define" "("sym fargs")" #e")"::=Scheme-like definition.
- conditional::="(cond" #case")"::=evaluate first case with non-null predicate.
- case::= "("pred e #e")".
- define_macro::="(defmacro" sym fargs #e")"::=define a macro.
- define_funtion::="(defun" sym fargs #e")"::=define a function.
- loop::=do_loop.
- do_loop::="(do" O("*") "("#binding")" "("texpr #rexpr")" #e")" | "(dolist" "("sym e #rexpr")" #e")" | "("dotimes "("sym e #rexpr")" #e ")".
- lambda_expression::="(lambda" args #e")"::=returns an unamed function closure.
- block::="(let" "("#(binding")" #e")"::=create local bindings.
- local_seq_environment::="(let*" "("#(binding")" #e")"::=sequentially create local bindings.
- program::="(prog*" "(" #binding")" #e")" | "(prog1" e1 #e")" | "(prog2" e1 e2 #e ")" | "(progn" #[e")"
- raw_data::="(quote" e ")"::=return an expression unevaluated.
Functions
These all have same syntax
- (functions_name args...)
Symbolic:+-*...
- *::=multiply a list of numbers.
- +::=add a list of numbers.
- -::=subtract a list of numbers or negate a single number.
/::=divide a list of numbers.
/=::=test for not equal to.
- 1+::=add one to a number.
- 1-::=subtract one from a number.
- <::=test for less than.
- <=::=test for less than or equal to.
- =::=test for equal to.
- >::=test for greater than.
- >=::=test for greater than or equal to.
A
- abs::=the absolute value of a number.
- address-of::=get the address of an xlisp node.
- alloc::=change number of nodes to allocate in each segment.
- and::=the logical and of a list of expressions(shortcircuited).
- append::=append lists.
- apply::=apply a function to a list of arguments.
- aref::=get the nth element of an array.
- assoc::=find an expression in an a-list.
- atom::=is this an atom?.
B
- backquote::=fill in a template - Macro arguments prefixed by comma.
- baktrace::=print n levels of trace back information.
- boundp::=is this a bound symbol?.
- break::=enter a break loop.
C
- car::=return the car --first part-- of a list node.
- case::=(value [e]...)`.
- catch::=evaluate expressions and catch throws.
- cdr::=return the cdr -- second part -- of a list node.
- cerror::=signal a correctable error.
- char::=extract a character from a string.
- clean-up::=clean-up after an error.
- close::=close a file.
- comma::=evaluate argument in a backquoted macro body(?).
- comma_at::=evaluate argument in a backquoted macro body and splice.
- cond::Forms=A LISP conditional form that tests a series of pairs and selects the first where the first part of the pair evaluates to a non-null value like T. -- see conditional.
- cons::=construct a new list node out of two arguments.
- consp::=is this a non-empty list?.
- continue::=continue from a correctable error.
- cos::=compute the cosine of a number.
- cxxr::=all cxxr combinations.
(cdar x) = (cdr (car x)).
- cxxxr::=all cxxxr combinations.
- cxxxxr::=all cxxxxr combinations.
D
- define::Forms=The Scheme form that returns a new function -- see definition.
- defun::Forms=The XLISP form that returns a new function -- see define_function.
- defmac::Forms=The XLISP form that creates new forms! -- see define_macro.
- delete::=delete an expression from a list.
E
- eq::=are the expressions identical?.
- eql::=are the expressions identical?.
- equal::=are the expressions equal?.
- error::=signal a non-correctable error.
- errset::=trap errors.
- eval::=evaluate an xlisp expression.
- evalhook::=evaluate with hooks.
- evenp::=is this number even?.
- exit::=exit xlisp.
- exp::=compute e to the e power.
- expand::=expand memory by adding segments.
- expt::=compute e1 to the e2 power.
F
- flatc::=length of printed representation using princ.
- flatsize::=length of printed representation using prin1.
- float::=converts an integer to a floating point number.
- funcall::=call a function with arguments.
- function::=quote a function.
G
- gc::=force garbage collection.
- gensym::=generate a symbol.
- get::=get the value of a property.
- go::=go to a tag within a prog construct.
H
- hash::=compute the hash index for a symbol.
- help::=Scan functions.lsp for function named sym.
I
- if::=if texpr then expr1 else expr2.
- intern::=make an interned symbol.
L
- last::=return the last list node of a list.
- length::=find the length of a list or string.
- list::=create a list of values.
- listp::=is this a list?.
- load::=load an xlisp source file.
- logand::=the bitwise and of a list of numbers.
- logior::=the bitwise inclusive or of a list of numbers.
- lognot::=the bitwise not of a number.
- logxor::=the bitwise exclusive or of a list of numbers.
M
- make-array::=make a new array.
- make-symbol::=make an uninterned symbol.
- man::=Display the manual pages.
- mapc::=apply function to successive cars.
- mapcar::=apply function to successive cars.
- mapl::=apply function to successive cdrs.
- maplist::=apply function to successive cdrs.
- max::=the largest of a list of numbers.
- mem::=show memory allocation statistics.
- member::=find an expression in a list.
- min::=the smallest of a list of numbers.
- minusp::=is this number negative?.
N
- nconc::=destructively concatenate lists.
- not::=is this false?.
- nth::=return the nth element of a list.
- nthcdr::=return the nth cdr of a list.
- null::=is this an empty list?.
- numberp::=is this a number?.
O
- oddp::=is this number odd?.
- open::=open a file, returns stream for I/O.
- or::=the logical or of a list of expressions.
P
- peek::=peek at a location in memory.
- peek-char::=peek at the next character.
- plusp::=is this number positive?.
- poke::=poke a value into memory.
- prin1::=print a list of values.
- princ::=print a list of values without quoting.
- print::=print a list of values on a new line.
- prog::=the program feature.
- putprop::=put a property onto a property list.
R
- random::=compute a random number between 1 and n-1.
- read::=read an xlisp expression.
- read-char::=read a character from a file or stream.
- read-line::=read a line from a file or stream.
- rem::=remainder of a list of numbers.
- remove::=remove an expression.
- remprop::=remove a property.
- return::=cause a prog construct to return a value.
- reverse::=reverse a list.
- rplaca::=replace the car of a list node.
- rplacd::=replace the cdr of a list node.
S
- set::=set the value of a symbol.
- setf::=set the value of a field.
- setq::=set the value of a symbol.
- sin::=compute the sine of a number.
- sqrt::=compute the square root of a number.
- strcat::=concatenate strings.
- string::=make a string from an integer ascii value.
- sublis::=substitute with an a-list.
- subst::=substitute expressions.
subseq e sexpr [lexpr]) extract a substring`.
- symbol-name::=get the print name of a symbol.
- symbol-plist::=get the property list of a symbol.
- symbol-value::=get the value of a symbol.
- symbolp::=is this a symbol?.
- system::=send string as command to operating system..
T
- tan::=compute the tangent of a number.
- terpri::=terminate the current print line.
- throw::=throw to a catch.
- top-level::=clean-up after an error and return to the top level.
- transcript::=create a file with a transcript of a session.
- truncate::=truncates a floating point number to an integer.
- type-of::=returns the type of the expression.
W
- write-char::=write a character to a file or stream.
Z
- zerop::=is this number zero?.
. . . . . . . . . ( end of section Functions) <<Contents | End>>
. . . . . . . . . ( end of section LISP functions and Macros) <<Contents | End>>
End