XLISP >
XLISP 2.0 -
Contents -
Reference -
Previous |
Next
Contents
- Introduction
- A Note From The Author
- XLISP Command Loop
- Break Command Loop
- Data Types
- The Evaluator
- Lexical Conventions
- Readtable
Read Table Entries:
Read Macros:
- ' - read macro for quote
- #' - read macro for function
- #() - read macro for arrays
- #x - read macro for hexadecimal numbers
- #o - read macro for octal numbers
- #b - read macro for binary numbers
- #\ - read macro for character values
- #|...|# - read macro for comments
- #: - read macro for uninterned symbols
- ` - read macro for backquote
- , - read macro for comma
- ,@ - read macro for comma-at
Characters Names:
- Lambda Lists
- Objects
- Symbols
- self- the current object [within a method context]
- *obarray* - the object hash table
- *standard-input* - the standard input stream
- *standard-output* - the standard output stream
- *error-output* - the error output stream
- *trace-output* - the trace output stream
- *debug-io* - the debug i/o stream
- *breakenable* - flag controlling entering break loop on errors
- *tracelist* - list of names of functions to trace
- *tracenable* - enable trace back printout on errors
- *tracelimit* - number of levels of trace back information
- *evalhook* - user substitute for the evaluator function
- *applyhook* - [not yet implemented]
- *readtable* - the current readtable
- *unbound* - indicator for unbound symbols
- *gc-flag* - controls the printing of 'gc' messages
- *gc-hook* - function to call after garbage collection
- *integer-format* - format for printing integers
- *float-format* - format for printing floats
- *print-case* - symbol output case
- + - the most recent input expression
- ++ - the next to the last input expression
- +++ - the second to the last input expression
- * - the result of the previously evaluated expression
- ** - the result of the next to the last evaluated expression
- *** - the result of the second to the last evaluated expression
- - - the expression currently being evaluated
- Evaluation Functions
- Symbol Functions
- 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
- Array Functions
- aref - get the nth element of an array
- make-array - make a new array
- vector - make an initialized vector
- 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
- 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
- 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 ?
- 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
- 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
- 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
- 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
- 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
- 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
- String Functions
- 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 ?
- Input/Output Functions
- get-key - get a single key stroke from the keyboard
- read - read an expression
- 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
- The Format Function
- File I/O Functions
- String Stream Functions
- System Functions
- load - load a source file
- 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
- address-of - get the address of an xlisp node
- system - execute a command of the operating system
- exit - exit xlisp
- File I/O Examples
- Nyquist Functions - only available in the Nyquist version of XLISP
XLISP >
XLISP 2.0 -
Contents -
Reference -
Previous |
Next