XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

# Contents

1. Introduction
2. A Note From The Author
3. XLISP Command Loop
4. Break Command Loop
5. Data Types
6. The Evaluator
7. Lexical Conventions
9. Lambda Lists
10. Objects
11. Symbols
12. Evaluation Functions
13. Symbol Functions
14. Property List Functions
• get - get the value of a property
• putprop - put a property onto a property list
• remprop - remove a property from a property list
15. Array Functions
• aref - get the nth element of an array
• make-array - make a new array
• vector - make an initialized vector
16. List Functions
• car - return the car of a list node
• cdr - return the cdr of a list node
• cxxr - all cxxr combinations
• cxxxr - all cxxxr combinations
• cxxxxr - all cxxxxr combinations
• first - get the first element of a list
• second - get the second element of a list
• third - get the third element of a list
• fourth - get the fourth element of a list
• rest - get the rest of the list except the first element
• cons - construct a new list node
• list - create a list of values
• append - append lists
• reverse - reverse a list
• last - return the last list node of a list
• member - find an expression in a list
• assoc - find an expression in an a-list
• remove - remove elements from a list
• remove-if - remove elements that pass test
• remove-if-not - remove elements that fail test
• length - find the length of a list, vector or string
• nth - return the nth element of a list
• nthcdr - return the nth cdr of a list
• mapc - apply function to successive cars
• mapcar - apply function to successive cars
• mapl - apply function to successive cdrs
• maplist - apply function to successive cdrs
• subst - substitute expressions
• sublis - substitute with an a-list
17. Destructive List Functions
• rplaca - replace the car of a list node
• rplacd - replace the cdr of a list node
• nconc - destructively concatenate lists
• delete - delete elements from a list
• delete-if - delete elements that pass test
• delete-if-not - delete elements that fail test
• sort - sort a list
18. Predicate Functions
• atom - is this an atom ?
• symbolp - is this a symbol ?
• numberp - is this a number ?
• null - is this an empty list ?
• not - is this false ?
• listp - is this a list ?
• endp - is this the end of a list ?
• consp - is this a non-empty list ?
• integerp - is this an integer ?
• floatp - is this a float ?
• stringp - is this a string ?
• characterp - is this a character ?
• arrayp - is this an array ?
• streamp - is this a stream ?
• objectp - is this an object ?
• boundp - is a value bound to this symbol ?
• fboundp - is a functional value bound to this symbol ?
• minusp - is this number negative ?
• zerop - is this number zero ?
• plusp - is this number positive ?
• evenp - is this integer even ?
• oddp - is this integer odd ?
• eq - are the expressions identical ?
• eql - are the expressions identical ?
• equal - are the expressions equal ?
19. Control Constructs
• cond - evaluate conditionally
• and - the logical AND of a list of expressions
• or - the logical OR of a list of expressions
• if - evaluate expressions conditionally
• when - evaluate only when a condition is true
• unless - evaluate only when a condition is false
• case - select by case
• let - create local bindings
• let* - let with sequential binding
• flet - create local functions
• labels - flet with recursive functions
• macrolet - create local macros
• catch - evaluate expressions and catch throws
• throw - throw to a catch
• unwind-protect - protect evaluation of an expression
20. Looping Constructs
• loop - basic looping form
• do - loop while the termination test is NIL
• do* - 'do' loop with sequential binding
• dolist - loop through a list
• dotimes - loop from zero to n-1
21. The Program Feature
• prog - the program feature
• prog* - 'prog' with sequential binding
• block - named block
• return - cause a prog construct to return a value
• return-from - return from a named block
• tagbody - block with labels
• go - go to a tag within a tagbody or prog
• progv - dynamically bind symbols
• prog1 - return the value of the first expression
• prog2 - return the value of the second expression
• progn - return the value of the last expression
22. Debugging and Error Handling
• trace - add a function to the trace list
• untrace - remove a function from the trace list
• error - signal a non-correctable error
• cerror - signal a correctable error
• break - enter a break loop
• clean-up - clean-up after an error
• top-level - clean-up after an error and return to the top level
• continue - continue from a correctable error
• errset - trap errors
• baktrace - print n levels of trace back information
• evalhook - evaluate with hooks
23. Arithmetic Functions
• truncate - truncates a floating point number to an integer
• float - converts an integer to a floating point number
•  +  - add a list of numbers
•  -  - subtract a list of numbers or negate a single number
•  *  - multiply a list of numbers
•  /  - divide a list of numbers
• 1+ - add one to a number
• 1- - subtract one from a number
• rem - remainder of a list of numbers
• min - the smallest of a list of numbers
• max - the largest of a list of numbers
• abs - the absolute value of a number
• gcd - compute the greatest common divisor
• random - compute a random number between 0 and n-1 inclusive
• sin - compute the sine of a number
• cos - compute the cosine of a number
• tan - compute the tangent of a number
• asin - compute the arcsine of a number
• acos - compute the arccosine of a number
• atan - compute the arctangent of a number
• expt - compute x to the y power
• exp - compute e to the x power
• sqrt - compute the square root of a number
•  <  - test for less than
•  <=  - test for less than or equal to
•  =  - test for equal to
•  /=  - test for not equal to
•  >=  - test for greater than or equal to
•  >  - test for greater than
24. Bitwise Logical Functions
• logand - the bitwise and of a list of numbers
• logior - the bitwise inclusive or of a list of numbers
• logxor - the bitwise exclusive or of a list of numbers
• lognot - the bitwise not of a number
25. String Functions
26. Character Functions
• char - extract a character from a string
• upper-case-p - is this an upper case character ?
• lower-case-p - is this a lower case character ?
• both-case-p - is this an alphabetic [either case] character ?
• digit-char-p - is this a digit character ?
• char-code - get the ASCII code of a character
• code-char - get the character with a specified ASCII code
• char-upcase - convert a character to upper case
• char-downcase - convert a character to lower case
• digit-char - convert a digit weight to a digit
• char-int - convert a character to an integer
• int-char - convert an integer to a character
• char< - test for less than in ASCII ordering
• char<= - test for less than or equal to in ASCII ordering
• char= - test for equal to in ASCII ordering
• char/= - test for not equal to in ASCII ordering
• char>= - test for greater than or equal to in ASCII ordering
• char> - test for greater than in ASCII ordering
• char-lessp - is this less than in ASCII ordering ?
• char-not-greaterp - is this not greater than in ASCII ordering ?
• char-equal - is this equal in ASCII ordering ?
• char-not-equal - is this not equal in ASCII ordering ?
• char-not-lessp - is this not less than in ASCII ordering ?
• char-greaterp - is this greater than in ASCII ordering ?
27. Input/Output Functions
• get-key - get a single key stroke from the keyboard
• print - print an expression on a new line
• prin1 - print an expression
• princ - print an expression without quoting
• pprint - pretty print an expression
• terpri - terminate the current print line
• flatsize - length of printed representation using prin1
• flatc - length of printed representation using princ
28. The Format Function
29. File I/O Functions
30. String Stream Functions
31. System Functions
• save - save workspace to a file
• restore - restore workspace from a file
• dribble - create a file with a transcript of a session
• gc - force garbage collection
• expand - expand memory by adding segments
• alloc - change number of nodes to allocate in each segment
• room - show memory allocation statistics
• type-of - returns the type of the expression
• peek - peek at a location in memory
• poke - poke a value into memory