% VAX-11 Librarian V03-00`t?PG  5`@nA-listABS2ADD1AND~APPENDHAPPEND1APPEND2APPLYZARGZASPAWNjASSOCATOM>ATOMCARATOMCDRr ATOMLENGTH@Atoms*ATOMSTRATTACHBREAKCARCDR CLOSELOG!CMPSTR!>CMPSTRCI"CODEP"Comments#LCOMPRESS$^COND% Conditions&fCONS'CONSP' CONSTANTP'pCOPY(|D-list*DEBUG*ZDEFINE+tDEFPROP+DELETEV$^COND% Conditions&fCONS'CONSP' CONSTANTP'pCOPY(|D-list*DEBUG*ZDEFINE+tDEFPROP+DELETE, DELSUBSTR,DF.t DIFFERENCE.DIVIDE.DM/DOWNCASE/DRM1HEDD2EDL2EDLAUX9EDP9EDV:ELEMENT;4EQ;EQN;EQUAL<ERROR=JError_recovery>EVAL>EVLIS?EXIT?2EXPLODE?EXPT@>FILLSTRAFIXA|FIXPAFLAGAFLAG1BFLAGPXCOMPRESSERRORHASHSTRMEMBERPPPREMOB ZEROPONST^=JError_recovery>EVAL>EVLIS?EXIT?2EXPLODE?EXPT@>FILLSTRAFIXA|FIXPAFLAGAFLAG1BFLAGPBnFLOATBFLOATPC\FormsIFUNARGJFUNCALLJxFUNCTIONKZGENSYMKdGETKGETDL2GETMSGLGETPMNGETVM$GOMGREATERPN^GROWMEMNHASHSTRNHELPOBIDPOIMPLODEPINTERNRINTERNCDSINTERNCITXLAMBDAXLASTYLENGTHY,LESSPYLETZLEXhNHELPOBIDPOIMPLODEPINTERNRINTERNCDSINTERNCITXLAMBDAXLASTYLENGTHY,LESSPYLETZLEXh LINELENGTHh LISP_INITj*LISTjLOCSTRjLOGANDkLOGIOlLOGORmLOOPqMAPr.MAPCrMAPCANrMAPCARs&MAPCONsMAPLISTtMAXtDMAX2tMEMBERuMEMQuTMINuMIN2vZMINUSvMINUSPv(MKATOMwlMKVECTxDMSGyNCONCyNodes{NOT{NULLauMEMQuTMINuMIN2vZMINUSvMINUSPv(MKATOMwlMKVECTxDMSGyNCONCyNodes{NOT{NULL{NUMBERP{zOb-list|.OBLIST|OCML}ONEP}LOR~ OUTF~OUTPUT>PAIRP&PLUSPLUS2(POPPOSNVPPPPAUXfPPDPPIJPPINTPPPPPPLpPRIN1XPRIN2PRINTPRLENGTHDPROGPROG1PROG2TPROGN4 PROMPTSTR PropertiesaPPPLpPRIN1XPRIN2PRINTPRLENGTHDPROGPROG1PROG2TPROGN4 PROMPTSTR PropertiesPUSH2PUT<PUTDPUTPROPPUTVQUITQUOTEQUOTIENTRATOMREADREADCHREADLNRECLAIM REMAINDERREMD0REMFLAG*REMOBREMPROPRREPEATRETURNREVERSERPLACARPLACDl S-expression"SASSOCNSETSETQDSQRTREMPROPRREPEATRETURNREVERSERPLACARPLACDl S-expression"SASSOCNSETSETQDSQRTSSPAWN`STATUSLSTRCONS:STRINGP STRLENGTHSUB1SUBSTtSUBSTRbTERPRITIMES&TIMES2TRACEF TRACELISTUNTILVUNTRACE(UPBVUPCASEVECTORPVERSIONWHILE@ZEROP  :1 @ @EThis may be used to invoke indirect command files, either on the DCL (command line, or during interactive use.@Command files may be nested up to three levels deep, and have a default file type of "LSP".CNote that the "@" character must appear in column one of the input record.(See LISP_INIT, OCML.)ww`s=>1 A-list#A-list stands for association list.GAn a-list is a list of dotted pairs, where the car of each dotted pair =is a  name, and the cdr is the value associated with the name.;SASSOC may be used for finding an association on an a-list.CThe CURRENT a-list (often called THE a-list) is the list of current?bindings for each atom. The a-list is modified during program Aexecution in three basic ways. When a function call occurs to a Bprogrammer-defined function, the LISP interpreter pairs the atoms Crepresenting the formal parameters with their corresponding actual Farguments and adds the resulting pairs to the beginning of the a-list.DA similar thing happens when a PROG is entered. When a function or APROG execution is completed, the associations added on entry are =deleted. The programmer may directly modify the most recent ;association for an atom on the a-list by using SET or SETQ.GIf an association is not found for an atom on the a-list, the value is <determined by the APVAL property on the atoms property list.wwH:1 ABS (ABS )Type: EVAL, SPREAD-Returns the absolute value of the number .ww c:1 ADD1 (ADD1 )Type: EVAL, SPREAD!Increment , return the result.ww:1 AND (AND ...)Type: NOEVAL, NOSPREAD>Evaluate the s-expressions sequentially until one is null,Athen return NIL, else return the value of the last evaluated.This is a special form.ww:1 APPEND(APPEND ...)Type: EVAL, NOSPREADDString together the elements of all the lists , as a single list.This is a special form.(See APPEND1, APPEND2)ww : 1 APPEND1(APPEND1 )Type: EVAL, SPREAD3Append to a copy of list , as a single list.(See APPEND, APPEND2)ww`#: 1 APPEND2(APPEND2 )Type: EVAL, SPREAD5Append to a copy of list , as a single list.(See APPEND, APPEND1)ww,%:1 APPLY&(APPLY () [])Type: EVAL, SPREAD*Apply to using ./If is omitted, use the current a-list.(See DF, Forms.)wwF+:1 ARG (ARG )BReturn argument number during the evaluation of a "no-spread" Flambda expression, or function definition consisting of such a lambda expression. must evaluate to an integer.(See Form, LAMBDA.)ww5:1 ASPAWN (ASPAWN )Type: EVAL, SPREAD>Spawns an asynchronous process to perform the DCL command .0 will be converted to a string, if necessary.>The value returned is an integer whose value is the process idof the process.wwS.:1 ASSOC(ASSOC )Type: EVAL, SPREAD1Find on the list of dotted pairs .6 is matched against the car of each dotted pair.0If is found, the dotted pair is returned,else NIL is returned. (See SASSOC.)ww 9:1 ATOM (ATOM )Type: EVAL, SPREAD/Return T if evaluates to an atom, else NIL.>Note that (ATOM '()) returns T, since () is equivalent to NIL.ww`<: 1 ATOMCAR(ATOMCAR )Type: EVAL, SPREAD/Extract the first character of the atom ,return it as an atom.ww=: 1 ATOMCDR(ATOMCDR )Type: EVAL, SPREAD7Extract all but the first character of the atom ,return it as an atom.wwC: 1 ATOMLENGTH(ATOMLENGTH )Type: EVAL, SPREAD;Return the length (in characters) of the input atom ,!as it would be expanded by PRINT.(See STRINGLENGTH)wwE>1 AtomsAtoms are one of the following: atomic symbol number (integer or real) string 2 NumbersBLISP supports both integer (I*4) and floating point (R*4) numbers.8The two types may be freely mixed in almost any context;1 exceptions: LINELENGTH, LOGAND, LOGOR, REMAINDER, which require all arguments to be integers.3 ImplementationENumeric nodes are implemented with the flag word indicating the type,Bei ther integer or floating point, and the car field containing thevalue. 2 StringsLISP supports string literals.DStrings are enclosed in double quote characters ("), and are always (terminated by the end of the input line.BEmbedded double quote characters may be indicated by doubling the Ddouble quote characters, e.g., "DOUBLE QUOTE (""), SINGLE QUOTE (')"9represents the string DOUBLE QUOTE ("), SINGLE QUOTE (').DMost functions which manipulate strings will accept any form of atom'and convert it to a string before use. 3 ImplementationGString nodes are implemented with the flag word indicating the node is Aa string, and the car and cdr fields containing a dynamic string "descriptor in standard VMS format.A(Note that predefined atomic symbols have PNAME strings that are ;represented using static, not dynamic, string descriptors.) 2 SymbolsFAtomic symbols are uniquely represented in memory and possess property@lists. Every atomic symbol has a PNAME property whose va lue is a<character string up to 64 characters long (see Properties). @When atomic symbols are read by the LISP input system, they are Enormally matched against the ob-list, using a special comparison thatFpermits upper and lower case alphabetic characters to be considered to4be equal. This case independance may be overridden.)(See INTERN, INTERNCD, INTERNCI, OBLIST.)3 ImplementationFAtomic symbol nodes are implemented with the flag word indicating the Dnode is an atomic symbol, and the CDR field containing a pointer to Ethe atom's property list, though teh CDR function will not return it.GAccess to property lists is through the normal property list functions E(e.g., GET, PUT, DEFPROP, etc.) and the function GETP, which returns "the entire property list of an id.wwI: 1 ATOMSTR(ATOMSTR )Type: EVAL, SPREAD/Returns a string equivalent to the atom .ww@L:1 ATTACH(ATTACH )Type: EVAL, SPREADFATTACH attaches the user's terminal to the process indicated by ,+which must be an integer. NIL is returned.(See ASPAWN, SSPAWN.)wwO:1 BREAK (BREAK )Type: EVAL, SPREADCBREAK is a debugging tool. When called, a TERPRI is invoked, and a:message is printed indicating that BREAK has been entered,0followed by the value resulting from (EVAL ).ESubsequently, all input is EVAL'd and PRINT'd, until the special form@(RETURN ) is entered. At this point, is EVAL'd and is .returned as the value of the BREAK expression.FA message is also printed to indicate that BREAK mode has been exited.BAll input while using BREAK is forced to come from DBG$INPUT, as aBnested command file, which is automatically exited when BREAK modeAis exited. The result is that input that has been redirected viaBa nested indirect command file is not messed up by the presence ofBREAK debugging expressions.wwZ:1 CAR (CAR )Type: EVAL, SPREADBIf is a  list or a dotted pair, return the first element in the+list. If is atomic or NIL, return NIL.FThis implementation also supports several CAR/CDR composite functions:( CAR CDR CAAR CADR CDAR CDDR7 CAAAR CAADR CADAR CADDR CDAAR CDADR CDDAR CDDDR8 CAAAAR CAAADR CAADAR CAADDR CADAAR CADADR CADDAR CADDDR8 CDAAAR CDAADR CDADAR CDADDR CDDAAR CDDADR CDDDAR CDDDDRww5b:1 CDR (CDR )Type: EVAL, SPREAD=If is a list, return a list of all but the f!irst element.>If is a dotted pair, return the second element of the pair$If is atomic or NIL, return NIL.FThis implementation also supports several CAR/CDR composite functions:( CAR CDR CAAR CADR CDAR CDDR7 CAAAR CAADR CADAR CADDR CDAAR CDADR CDDAR CDDDR8 CAAAAR CAAADR CAADAR CAADDR CADAAR CADADR CADDAR CADDDR8 CDAAAR CDAADR CDADAR CDADDR CDDAAR CDDADR CDDDAR CDDDDRww i: 1 CLOSELOG (CLOSELOG)Turn off input/output logging. (See LOG.)ww"o:1 CMPSTR(CMPSTR )Type: EVAL, SPREAD<Compare two (atoms as) strings, returning an integer result: -1 => <  0 => =  +1 => > FThe comparison is performed strictly according to the ASCII collating sequence, i.e., "a">"A". See CMPSTRCI.wwr: 1 CMPSTRCI(CMPSTRCI )Type: EVAL, SPREAD<Compare two (atoms as) strings, returning an integer result: -1 => <  0 => =  +1 => > FThe comparison is performed independant of case, i.e., all alphabetic Gcharacters are treated as if they were lower case ASCII, e.g., "a"="A".(See CMPSTR, UPCASE.)ww%|:1 CODEP (CODEP )Type: EVAL, SPREAD/Predicate which returns T iff evaluates to %a pointer to compiled code, else NIL. 2 Example(The following expression evaluates to T:(CODEP (CDR (GETD 'CODEP)))ww@qZ> 1 CommentsDThe character % may be used to indicate that all i$nformation on the Eline after the % character is to be ignored by the LISP input system.H(Note that it is possible to read the % character and anything after it using the READCH function.)CA semicolon (";") in column one causes the entire input line to be 6ignored by LISP. (READCH will never see these lines.)ww @: 1 COMPRESS(COMPRESS )Type: EVAL, SPREAD1Convert the list of atoms to a single atom.by concatenating the print names of each atom,from l%eft to right.A(This is the same as IMPLODE, and is provided for compatibility.)wwg:1 COND(COND ( [])...)Type: NOEVAL, NOSPREAD:Evaluate the 's one at a time until one is non-null,Creturn the value resulting from the evaluation of the corresponding clause.@If the clause is omitted for the first non-null ,*then the value of that is returned.FA clause may consist of multiple s-expressions, each of whichEis & evaluated in sequential order; the value of the final s-expression1is returned as the value of the clause. This is a special form.ww : 1 ConditionsGIf an error condition occurs in the LISP interpreter, the user presses Ethe control-C key, or a condition is signalled by any of the routinesHinvoked by it, LISP intercepts the condition with its condition handler.GThis condition handler flushes any partially completed output currently<in the LISP output buffer '(using TERPRI), prints the messageFassociated with the condition being signalled (using LIB$SYS_GETMSG), Dand then performs an UNWIND to clean up the system stack and return Bcontrol to the lisp interpreter at its restart point, forcing any Bindirect command file nesting to be reset and the READ-EVAL-PRINT processing loop to be restarted.ww :1 CONS(CONS )Type: EVAL, SPREAD(Construct a new node using and 'as the CAR and CDR parts, respectively.w(w>:1 CONSP (CONSP )Type: EVAL, SPREAD7Return T if does not evaluate to an atom, else NIL.ANote that (CONSP '()) returns NIL, since () is equivalent to NIL.%This function is equivalent to PAIRP.wwѣ: 1 CONSTANTP(CONSTANTP )Type: EVAL, SPREAD)Returns T if is a constant, else NIL.wwX:1 COPY (COPY )Type: EVAL, SPREADReturns a copy of .6Note that cyclic structures will cause infinite loops. )~//\\~1 DE(DE )Type: NOEVAL, NOSPREAD&Define a function with a name of ,7parameters in the list (which may be null),and the specified .FThe resulting function is equivalent to the definition obtained using DEFINE as follows:* (DEFINE (LAMBDA ))$(See D-list, DEFINE, Forms, LAMBDA.)wwc>1 D-list1D-list stands for the [function] definition list.BThe d-list is the list of current function definit *ion bindings forCeach atom. The d-list is modified by PUTD, which puts new functionEdefinitions on the list, and REMD, which removes definitions from theFlist. GETD may be used to find the current function definition for anatom on the d-list. ?There are also several specialized forms for creating function Ddefinitions on the d-list corresponding to the most common types of definition types:/ DE to create a normal EXPR function definition DEFINE a variant of DE/ DF to create an FEX+PR (special form processor) DM to create a MACRO definition% DRM to create a READMACRO definitionASee the help on each of these defining functions for more detail.Also see Form, and LAMBDA.ww@:1 DEBUG(DEBUG)Invoke VMS symbolic debugger.5LISP is LINKed with most of the symbols in the image.ww:1 DEFINE(DEFINE
)Type: NOEVAL, NOSPREAD&Define a function with a name of ,; becomes the value of the EXPR property on, the plist,<and is generally of the form (LAMBDA ...).(See D-list, Forms, LAMBDA.)ww: 1 DEFPROP(DEFPROP ...)Type: NOEVAL, NOSPREADBPut on on the property list of as the property, !without evaluating the arguments./If the property already exists, it is replaced;!otherwise it is added to the end.GAny number of pairs may be defined in a single invocation. Return .(See PUT, PUTPROP)ww-c:1 DELETE(DELETE )Type: EVAL, SPREAD4Delete first occurrence of from the list .wwp: 1 DELSUBSTR%(DELSUBSTR )Type: EVAL, SPREAD3Return a copy of with a substring deleted.3The substring starts at character position , and is characters long.(The first character has an of 1.ww ~:1 DF(DF )Type: NOEVAL, NOSPREAD4Define a spe .cial form processor with a name of ,7parameters in the list (which may be null),and the specified .@Special form processors do not have a fixed number of arguments.=When they are invoked, they are always passed two parameters:D 1. The first parameter contains a list of all arguments with which: the special form processor was invoked (unevaluated).6 2. The second parameter contains the current a-list.FThe effect is similar to definitions formed using DE, except t/hat the 3definition created is an FEXPR, instead of an EXPR.'(See APPLY, D-list, DE, Forms, LAMBDA.)ww,: 1 DIFFERENCE(DIFFERENCE )Type: EVAL, SPREAD*Returns the arithmetic difference -.ww :1 DIVIDE(DIVIDE )Type: EVAL, SPREADDDivide by and return the dotted pair (quotient . remainder).ww`:1 DM(DM )Type: NOEVAL, NOSPREAD#Define a macro with a name of ,7parame0ters in the list (which may be null),and the specified .FThe effect is similar to definitions formed using DE, except that the 2definition created is a MACRO, instead of an EXPR. (See D-list, DE, Forms, LAMBDA.)ww : 1 DOWNCASE(DOWNCASE )Type: EVAL, SPREAD)Return lowercase version of input string.!The input string is not modified.wwa:1 DRM(DRM )Type: NOEVAL, NOSPREAD9Define a read-macro with a name of 1 , and body .FThe effect is similar to definitions formed using DE, except that the 6definition created is a READMACRO, instead of an EXPR.Read macros have no arguments.?A read macro is evaluated when the name is encountered by READ.Its result is returned by READ.>Read macro names are frequently special characters or special Echaracter sequences that have had their character class changed using>LEX to CHRCLMONOP or CHRCLSPECIAL, so that they may be used as>prefixes to identi2fiers, which they read and manipulate beforereturning to READ. )(See D-list, DE, Forms, LAMBDA, and LEX.) 2 ExampleGiven the following: (LEX "\" 'CHRCLMONOP) (DRM \ (LIST 'QUOTE (READ)))AThe \ character will have the same effect as the ' character, and (PRINT \A)will evaluate to: Aww`*:1 EDD (EDD )Type: NOEVAL, NOSPREADDEdit the definition of the function using the list structureAeditor EDL and EDLAUX. If the editor is exi3ted with the X or XX Ecommands, EDD will use PUTD to replace the definition of withEthe result of the editing session; if the editor is exited with the Q3or QQ commands, the definition will not be changed.This is a special form.wwD:1 EDL (EDL )Type: EVAL, SPREAD7EDL is used to invoke the list structure editor EDLAUX.AWhen the edit session is completed, the result of the editing is returned by EDL.ww R:1 EDLAUX(EDLAUX )Type: EVAL, SPREAD@EDLAUX is the performance routine for the list structure editor.GEDLAUX is normally invoked using one of the functions EDD, EDL, or EDV.E is the list being edited, is the recursion level used to Bcreate the prompt string, and is the list containing .@(Note that builtin routines use local scoping of variables, and Dtherefore results of editing these functions may produce unexpected 4results.) The commands provided by the editor are 5:  list evaluated= number repeat count for the next command or list of commands6 A toggle the automatic display of the current element) B backup the pointer in the current list2 BOL move the pointer to the beginning of the list/ C copy the current list element to a variable / (the variable name must follow the C command)3 CL copy the entire list being edited to a variable! CV copy one variable to another 7 (both variable names follow: source then destination)$ D delete the elemen 6t at the pointer* DB delete all elements before the pointer6 DE delete all elements after the pointer (to the end)) DUP duplicate the element at the pointer) E edit the list at the pointer (recurse), EOL move the pointer to the end of the list1 EV edit a variable (name follows the EV command)9 F move the pointer forward in the list (to next element) H help, displays this text6 I insert one element at the pointer (element follows)2 IS insert a sublist at the pointer (list follows)< ISV 7 insert a sublist at the pointer (variable name follows)= IV insert one element at the pointer (variable name follows) L print the list being edited3 LL print the list containing the list being edited9 M invoke a macro (name follows, is a variable containing% a list of editor commands and data)8 OL print the list being edited as it was before changes4 P paste (insert the last thing deleted or replaced)( PB print the element before the pointer' PF print the element after the pointer$ P 8P print the element at the pointer& PS paste sublist (an IS version of P)6 Q quit one level of the list editor, return original 5 list (unless U has been performed, then return the  list current at that time)+ QQ quit all the way out of the list editor7 R replace the element at the pointer (D followed by I)( RS replace sublist (an IS version of R)+ RST restore the list (value printed by OL)* RSV rsplace sublist (an ISV version of R)0 RV replace with a variable (an IV version of R)9 S 9 search for an element EQUAL to value following command* SF search using a user specified function6 SM search for an element with a member EQUAL to value; SWAP swap the element at the pointer with the next element3 T toggle the macro trace (prints the value at the . pointer following each command in the macro)= U update the previous value of the list (used by OL and RST)8 X exit one level of the list editor, return edited list? XX exit all the way out of the list editor, return edited lis:twwj;1 EDP(EDP )Type: NOEVAL, NOSPREADDEdit the value of the property of the variable usingBthe list structure editor EDL and EDLAUX. If the editor is exitedCwith the X or XX commands, EDP will use PUT to replace the value ofEthe property with the result of the editing session; if the editor isAexited with the Q or QQ commands, the value will not be changed. This is a special form.ww ';1 EDV (EDV );Type: NOEVAL, NOSPREAD?Edit the value of the variable using the list structureAeditor EDL and EDLAUX. If the editor is exited with the X or XX @commands, EDV will use SET to replace the value of withEthe result of the editing session; if the editor is exited with the Q.or QQ commands, the value will not be changed.This is a special form.ww*; 1 ELEMENT(ELEMENT )Type: EVAL, SPREADReturn element of .; must evaluate to< an integer, and must be a list.ww`30;1 EQ(EQ )Type: EVAL, SPREAD8Return T if and are pointing to the same node,else return NIL.ww1;1 EQN(EQN )Type: EVAL, SPREAD+Return T if and are both numbers,and have equal values.;If the arguments are of different type (one integer and theFother floating point) then the integer is converted to floating point.ww@@;1 EQUAL(EQUAL <=s1> )Type: EVAL, SPREAD9Return T if the s-expressions and are the same.$Note that (EQUAL NIL '()) returns T.ww D;1 ERROR(ERROR [])Type: EVAL, SPREADETerminate execution and cause the LISP I/O system to print the error Dmessage indicated by the string . Optionally, the message may Gindicate that the error was encountered while executing the expression Cindicated by . If the second argument is not supplied, the Aexpr >ession indicated in the error message will be the ERROR form.ww`H;1 Error_recoveryAWhen an error occurs or when the ERROR function is invoked, LISP =terminates the evaluation of all expressions currently being (evaluated, and goes into error recovery.FA message is printed indicating the cause of the error, including the <expression that was being evaluated when the error occurred.@At this point, any indirect command file nesting is terminated, Breturning the LISP input s?ystem to reading from nesting level zeroA(normally SYS$INPUT, or terminating LISP if a command or indirect:command file was specified on the DCL LISP command line). @LISP then returns to the normal READ-EVAL-PRINT processing loop.ww>P;1 EVAL(EVAL [])Type: EVAL, SPREAD0Evaluate relative to the a-list .3If is omitted, the current a-list is used.wwKS;1 EVLIS(EVLIS [])Type: EVAL, SPREAD=Ev@aluate the list relative to the the a-list , returning the results as a list.3If is omitted, the current a-list is used.wwW;1 EXIT(EXIT)'Exit from LISP to the operating system.<Any output currently in the output buffer is not forced out.ww@fY; 1 EXPLODE(EXPLODE )Type: EVAL, SPREAD3Return a list of single character atoms forming theprint-name of .wws\;1 EXPT(EXPT )Type: EVAAL, SPREAD$Returns raised to the power.ww_; 1 FILLSTR(FILLSTR )Type: EVAL, SPREADECreate and return a string of length , completely filled withEthe character. must be numeric (integer or floating Bpoint). may be either a number (for the ASCII code), or a Fcharacter string, whose first character will be used. If is a Dempty character string, the result string will be filled with ASCII NUL charactersB (code 0).ww@e;1 FIX (FIX )Type: EVAL, SPREAD"Convert the number to integer.ww!g;1 FIXP (FIXP )Type: EVAL, SPREAD*Returns T if the number is an integer.wwh;1 FLAG(FLAG )Type: EVAL, SPREADAAdd to the property list of each id in the list .2 and each member of must be an id. (See FLAG1, FLAGP, and REMFLAG.)wwk;1 FLAG1(FLAG1 )Type: EVAL, SPREAD(Add to the property list of .! and must both be ids.(See FLAG, FLAGP, and REMFLAG.)wwn;1 FLAGP(FLAGP )Type: EVAL, SPREAD@Returns T if has previously been flagged with , else NIL.-Returns NIL if either of are not ids.(See FLAG and REMFLAG.)ww@q;1 FLOAT (FLOAT )Type: EVAL, SPREAD)Convert the number to floating point.ww dv;1 FLOATP (FDLOATP )Type: EVAL, SPREAD.Returns T if the number is floating point.ww`Gn>1 FormsDThe syntax of a function call in LISP is standard, and is known as aFform. A form consists of a list specifying the name of a function (or0a lambda-expression) and its arguments, if any. EThere are several different types of functions, distinguished by the Ename associated with the function on the d-list. The following is a ;summary of statements that are generally true of eacEh type:AEXPR fixed number of arguments FEXPR variable number of arguments6 arguments are EVALuated arguments are NOT EVALuated* implemented in LISP implemented in LISP- defined using DEFINE or DE defined using DF defines a special form?SUBR fixed number of aruments FSUBR variable number of aruments6 arguments are EVALuated arguments are NOT EVALuated* in machine language in machine language predefined predefined defines a special formDMACRO variable number Fof arguments LSUBR variable number of aruments5 arguments are NOT EVALuated arguments are EVALuated* implemented in LISP in machine language defined using DM predefined0 defines a special form defines a special form result is EVALuatedFNote that LEXPRs are presently not supported, however the same effect Cmay be achieved using a variant of lambda expressions (see LAMBDA).FAlso, although a READMACRO is not invoked using a form, it is similar 2in concept to a normal MACRO (see D-liGst and DRM).2 EXPR=This property indicates that the symbol stands for a functionwritten in LISP.AThe value of the property is an s-expression which must be a form5(and is usually a LAMBDA expression) to be evaluated. (See LAMBDA.)2 FEXPRAThis property indicates that the symbol stands for a special formprocessor written in LISP.=The value of the property is an s-expression which must be a "LAMBDA expression to be evaluated.5The LAMBDA expression may have one or two parameters.D HThe first parameter is associated with the entire argument list, in Cunevaluated form. The second argument, if supplied, is associated with the current a-list.(See APPLY, LAMBDA.)2 FSUBRAThis property indicates that the symbol stands for a special form&processor written in machine language.AThe value of the property is the address where the form processorwill be entered.(See APPLY, LAMBDA.)2 LSUBRAThis property indicates that the symbol stands for a special form&processor writ Iten in machine language.AThe value of the property is the address where the form processorwill be entered.(See APPLY, LAMBDA.)2 MACROBThis property indicates that the symbol stands for a special form processor written in LISP.=The value of the property is an s-expression which must be a "LAMBDA expression to be evaluated.BThe LAMBDA expression will have exactly one argument, which is the4entire s-expression associated with the MACROs call.=The result of the MACRO is not returned direJctly, but is then<EVALuated, permitting its use to extend the syntax of LISP. 2 SUBR=This property indicates that the symbol stands for a functionwritten in machine language.;The value of the property is the address where the functionwill be entered.ww~|;1 FUNARG(FUNARG )BFUNARG is not a function; it is a list form generated by FUNCTION.@Form which may be used to force APPLY to override current a-list)by using when evaluating .FA KFUNARG expression is used in place of a function name, primarily in @such situations as passing a function as an argument to another 2function to prevent unexpected conflicts in names.ww ; 1 FUNCALL(FUNCALL ...)Type: EVAL, NOSPREAD>Invoke the function named by , with any arguments supplied.This is a special form (LSUBR).ww; 1 FUNCTION(FUNCTION )Type: NOEVAL, NOSPREADCLike (QUOTE ), but it binds to the current enLvironmentAas (FUNARG ) where is the current a-list.wwG;1 GENSYM(GENSYM)1Generate a new symbol of form 'Gn', where n is an9integer which is incremented each time GENSYM is invoked.AThe symbol created by GENSYM is not interned on the ob-list, and %consequently not EQ to anything else.wwT;1 GET(GET )Type: EVAL, SPREAD?Get the value of the property from 's property list.wwb;M1 GETD (GETD )Type: EVAL, SPREAD.Search the list of defined functions for .EIf is not found, return NIL. If is found, return a dotted Cpair containing the function's type as its CAR, and the function's definition as its CDR. (See D-list, Forms, REMD, PUTD.)ww ;1 GETMSG(GETMSG )Type: EVAL, SPREADBRetrieve the message text (as a string) corresponding to the inputsystem message number .ww;1 GETP (GETNP )Type: EVAL, SPREAD!Return the property list of .ww`;1 GETV(GETV )Type: EVAL, SPREAD=Returns the vector element specified by and . must be an integer.&(See MKVECT, PUTV, UPBV, and VECTORP.)ww;1 GO (GO ])Type: NOEVAL, NOSPREADBThe LISP HELP command works like the VMS interactive HELP command.D is an optional atom that, if present, is used as the initial keyfor searching the help library.6 may be a symbol or a string, and is not evaluated.HELP is a special form.ww_;1 IDP (IDP )Type: EVAL, SPREAD@Returns T if is an id, i.e., an atomic symbol that is not a $literal, such as a number or string.ww m; Q1 IMPLODE(IMPLODE )Type: EVAL, SPREAD1Convert the list of atoms to a single atom0by concatenating the print names of each atom inthe list, from left to right.ww`z;1 INTERN(INTERN )Type: EVAL, SPREADGINTERN searches the ob-list for an identifier with the same print-name Aas its argument , which may be either an atomic symbol, or aBstring. If a match is found on the ob-list, the atom is returned.@If no match is found, a new entry on t Rhe ob-list is created and @returned. Any properties and global values associated with the uninterned symbol will be lost.FWhen a string is being INTERN'd, they are normally matched against theDob-list using a special comparison that permits upper and lower case4alphabetic characters to be considered to be equal. EThis feature may be enabled or disabled using the functions INTERNCI and INTERNCD, respectively.FIt is also possible to cause all input to be translated to upper case AbeforeS interpretation by the LISP input system using the special "builtin symbol !*RAISE (see READ).=(See Atoms [subheading Symbols], INTERNCD, INTERNCI, OBLIST.)ww ; 1 INTERNCD (INTERNCD)@Evaluation of this function causes INTERN to perform all of its Ecomparisons with the print names of symbols on the ob-list in a case dependant manner.>This would cause (INTERN "X") and (INTERN "x") to evaluate to =different atomic symbols (this IS NOT the default situation).;INTERNCDT returns T if INTERN was previously operating in a )case-dependant manner, and NIL otherwise.(See INTERN, INTERNCI)ww@C; 1 INTERNCI (INTERNCI)@Evaluation of this function causes INTERN to perform all of its Ecomparisons with the print names of symbols on the ob-list in a case independant manner.>This would cause (INTERN "X") and (INTERN "x") to evaluate to 8the same atomic symbols (this IS the default situation).;INTERNCD returns T if INTERN was previously operatinUg in a )case-dependant manner, and NIL otherwise.(See INTERN, INTERNCD)ww@x;1 LAMBDA(LAMBDA ...)ALAMBDA is not a function; it is a list form which may be used to :specify an anonymous function, i.e., a function without a <name. This is generally used with functions such as MAPCAR.A is normally a (possibly empty) list of atoms that areEmapped (spread) to the function's arguments. It may also be a single)atom, indicating a "no-spreaVd" function. / is the form that expresses the function.GIf there is more than one , they are evaluated sequentially, and 'the value of the final one is returned.(See ARG, Form.) 2 Examples1The following expression prints 1 and returns 2: & ((LAMBDA (X) (PRINT X) (PLUS X X)) 1)<The following expression prints 3 (the number of arguments):& ((LAMBDA X (PRINT (ARG X))) 'A 'B 'C)7The following expression prints B (the third argument):. ((LAMBDA X (PRINT (ARG (ARG W 1)))) 3 'A 'B 'C) 2 No-spreadFThis term is used to indicate that the actual arguments of the lambda Hexpression are not spread across the dummy parameters of the expression.=Instead, the single argument of a "no-spread" type of lambda Cexpression contains the number of actual arguments, and the actual 2arguments must be obtained using the ARG function.BThis results in the ability to have an arbitrary number of actual Earguments to the expression (this is generally used only for defined Xfunctions).DFunctions defined (generally using DEFINE or DE) with a single atom Dparameter lambda expression as their definition differ from special @form processors defined using DF (or builtin FSUBRs) in that theAarguments of special form processors are not evaluated by EVAL orEAPPLY before the special form processor is invoked, whereas no-spreadEstyle lambda expression definitions (and LSUBRs) have their argumentsDevaluated before their definition is invoked. This is a very subtleDdi Ystinction that generally makes no difference when the special form@processor evaluates its own arguments, but can cause apparently 1anomalous behaviour when the function is APPLY'd.(See ARG, Forms.)2 SpreadEThis term is used to indicate the the actual arguments of the lambda Eexpression are spread out, one to each dummy parameter of the lambda expression.FThere is the additional restriction that the number of arguments must 'exactly match the number of parameters.ww[;Z1 LAST (LAST )Type: EVAL, SPREAD;Returns a list which contains only the last element of . must be a list.wwh;1 LENGTH (LENGTH )Type: EVAL, SPREAD*Return number of elements in the list .)If evaluates to an atom, return zero.ww;1 LESSP(LESSP )Type: EVAL, SPREAD9Return T if the number is less than the number .ww ;1 LET+(LET ( ...) ...)Ty[pe: NOEVAL, NOSPREADBLET is a builtin macro (really an FSUBR) that translates the input.form, as given above into the following form: 4 ((LAMBDA ( ...) ...) ...):The intent is to allow definition of local variables with initialization.E, ... are atoms which become local variables, initialized by 9the results of evaluating the s-expressions , ...EUsing these local definitions, the forms , ... are evaluated. (See LAMBDA.)ww \$;1 LEX(LEX [])Type: EVAL, SPREADDObtain and optionally establish new character class for the lexical 4analyzer used by LISP system input (READ and RATOM).A is the character for which the class is to be manipulated.GIf is specified, it is the new character class for , and 3the previous character class of is returned.D may be a character string, of which only the first character Fis used, an atom, in which case the first char ]acter of the print name Cis used, or a number, in which case the number indicates the ASCII 7code of the character whose class is to be manipulated.FThe character class for the ASCII NUL character (binary zero) may not be changed.D is a number, for which symbolic values have been establishedB(see the additional help). If an invalid class is specified, the Evalue NIL is returned, and the class of the character is not changed.GThe value returned by LEX will be either an atom, indica ^ting the class 5of or NIL indicating an error in invoking LEX. 2 ClassesEThe following symbolic names have been established for the character classes: 3 CHRCLALPHAAThis class indicates that the designated character is alphabetic.2Alphabetic characters may begin identifier tokens.BIdentifiers may also contain characters of numeric (CHRCLNUMERIC) 'and "internal ID" (CHRCLINTID) classes.FThis is the class returned by the lexical analyzer to indicate it has 1recognized an identifi _er as the next input token. 3 CHRCLCOMBEGGThis class indicates that the designated character may begin a comment.4Comments are never returned by the lexical analyzer.5An example would be the { and } characters in PASCAL.CNote that because of certain restrictions in the lexical analyzer, @comments so delimited may not appear in the following locations:" Before a "." in a dotted pair, or before a ")" or "]" in a list.CIf such a comment appears in these locations, the ".", ")", or "]" D `will not be properly recognized by READ for its normal significance.See CHRCLCOMEND. 3 CHRCLCOMENDEThis class indicates that the designated character may end a comment.4Comments are never returned by the lexical analyzer.5An example would be the { and } characters in PASCAL.GWhen a character of this class is the first character encountered when Gthe lexical analyzer is searching for the next token, the character is )considered to be of the CHRCLMONOP class.See CHRCLCOMBEG. 3 CHRCLFLO aATBThis is a special value that may not be used as a character class.EIt is the value returned by the internal lexical analyzer to indicateJthat a floating point number has been recognized as the next input token. 3 CHRCLINTIDAThis class mey be used to designate characters which may be used ?within identifiers, but may not be used to begin an identifier.$An example would be the _ character.GWhen a character of this class is the first character encountered when Gthe lexical analyzer is sebarching for the next token, the character is )considered to be of the CHRCLMONOP class.See CHRCLALPHA. 3 CHRCLMONOPFThis class may be used to indicate that the designated character is a single character token.See CHRCLSPECIAL. 3 CHRCLNULLFThis class may be used to indicate the the designated character is to "be totally ignored in any context.See CHRCLWHSPACE.3 CHRCLNUMERICFThis class is used to designate all characters that may begin numeric <tokens. It may be used to restric ct number to octal (by not Edesignating 8 and 9 numeric) or to permit A-F and a-f to be used for Chexidecimal (when identifiers may not begin with these characters).BNote that a special check is made to permit + and - to be used to Ebegin numeric tokens, as long as the character immediately following the + or - is of numeric class. 3 CHRCLQUOTEFThis class may be used to designate characters that are to be used to Edesignate literal strings. A literal string must begin and end with Ethe dsame character (of CHRCLQUOTE class), and if this same character <is to be represented within the literal, it must be doubled.FE.g., if " is a CHRCLQUOTE character, the following is a valid quoted Cliteral token: "The "" character is a quote." which represents the $string 'The " character is a quote.'3 CHRCLSPECIALGThis class may be used to designate characters that may be combined to Dform multicharacter tokens, that are distinguished from identifiers.AFor example, <, =, and > may be desi egnated as CHRCLSPECIAL class Ctokens to permit the sequences <=, =>, >=, <>, ><, ==, etc., to be used as single tokens. 3 CHRCLTERMNEThis class may be used to designate characters that are to terminate Ethe search for tokens on an input record. Anything past a character Fof this class will be totally ignored by the lexical analyzer (unless ;the character appears in a quoted literal, see CHRCLQUOTE).GFor example, the character % in LISP is used to indicate that anything Afollowing it ofn an input line is to be ignored by the LISP input +system, and therefore treated as a comment.3 CHRCLWHSPACEBThis class is used to designate characters that are to be ignored 5between tokens, such as the space and tab characters.See CHRCLNULL. 2 ExampleThe expression: (LEX ";" 'CHRCLTERMN)Bwould cause the semicolon to be treated as an end-of-record by theELISP input system. This would make it equivalent to the % character Fin standard LISP, i.e., anything after the semicolong would be ignored. 2 Standard8This is the standard character class table used by LISP: Class Range Character(s)!CHRCLSNULL <0> <8> ; nul...bsCHRCLSWHSPACE <9> ; tab.CHRCLSNULL <<^X0A>> <<^X1F>> ; control chars!CHRCLSWHSPACE <<^X20>> ; blankCHRCLSALPHA <<^X21>> ; !CHRCLSQUOTE <<^X22>> ; "CHRCLSALPHA <<^X23>> ; #CHRCLSALPHA <<^X24>> ; $CHRCLSTERMN <<^X25>> ; %CHRCLSALPHA <<^X26>> ; &CHRCLSMONOP <<^X27>> ; '$CHRCLSMONOP <<^X2h8>> <<^X29>> ; ()$CHRCLSALPHA <<^X2A>> <<^X2B>> ; *+CHRCLSWHSPACE <<^X2C>> ; ,CHRCLSALPHA <<^X2D>> ; -CHRCLSMONOP <<^X2E>> ; .CHRCLSALPHA <<^X2F>> ; /(CHRCLSNUMERIC <<^X30>> <<^X39>> ; 0...9$CHRCLSALPHA <<^X3A>> <<^X3B>> ; :;%CHRCLSALPHA <<^X3C>> <<^X3E>> ; <=>$CHRCLSALPHA <<^X3F>> <<^X40>> ; ?@'CHRCLSALPHA <<^X41>> <<^X5A>> ; A...ZCHRCLSMONOP <<^X5B>> ; [CHRCLSALPHA <<^X5C>> ; \CHRCLSMONOP <<^X5D>> ; ]CHRCLSALPHA <<^X5E>> ; ^CHRCLSiALPHA <<^X5F>> ; _CHRCLSALPHA <<^X60>> ; `'CHRCLSALPHA <<^X61>> <<^X7A>> ; a...zCHRCLSALPHA <<^X7B>> ; {CHRCLSALPHA <<^X7C>> ; |CHRCLSALPHA <<^X7D>> ; }CHRCLSALPHA <<^X7E>> ; ~CHRCLSNULL <<^X7F>> ; delwwB< 1 LINELENGTH(LINELENGTH [])Type: EVAL, SPREAD.Return the current maximum output line length,/and if is present, establish a new maximum.( must be integer.)ww E< 1 LISP_INITCLISP_INIT is a log jical name that LISP searches for when it is firstErun. If the logical name is defined, LISP will assume that the valueEis the name of a LISP command file (default type .LSP), which will be,loaded before LISP prompts at the terminal. E.g., the DCL command line: $ASSIGN PP LISP_INIT?will cause LISP to load the contents of the file PP.LSP before *prompting at the terminal for other input.ANote that use of this feature disables the ability to specify an .indirect command file on the DCLk command line.(See @, OCML.)ww}J<1 LIST (LIST ...)Type: NOEVAL, NOSPREADBEvaluate a list of s-expressions and return a list of the results.This is a special form.ww@M<1 LOCSTR(LOCSTR )Type: EVAL, SPREADASearch starting at , return the index in where begins.#If is not found, return zero.7Note that the comparison is case dependant for letters. (See UPCASE.)ww R<l1 LOGAND(LOGAND ...)Type: EVAL, NOSPREAD$Return bitwise and of each argument.%Each must evaluate to an integer.This is a special form.ww`+U<1 LOGIO(LOGIO )Type: EVAL, SPREADADirect the LISP input/output system to create an output file into7which all normal LISP input and output will be copied. >The name of the file is indicated by . If Devaluates to an atomic symbol, its print-name is used. If *evaluamtes to a string, its value is used. =Input lines are logged as-is. Output lines are logged with aFsemi-colon character in column one, causing the lines to be ignored byAthe input system completely (they are not even logged). Thus, logDfiles may be read as indirect command files to exactly reproduce the.results of the session creating the log file. /Logging may be terminated by invoking CLOSELOG. The default file type is ".LOG".ww_<1 LOGOR(LOGOR ...)Type: EVnAL, NOSPREAD#Return bitwise or of each argument.%Each must evaluate to an integer.This is a special form.wwb<1 LOOP'(LOOP ...)Type: NOEVAL, NOSPREADDLOOP is a macro (really an FSUBR) that provides a convenient syntax for PROG-like iteration.A provides for definition and initialization of local variables. Es provide the actions performed during the iteration, Ftesting for loop termination, and prooviding a resulting value for the LOOP form. (See PROG.)2 (The form of is as follows:" (INITIAL ...)Awhere each is an atom which becomes a local variable in the Fpseudo-PROG form constructed from the s, and each =is initialized to the value resulting from EVALuation of the corresponding s-expression .2 /The form of each is as follows: ( ...)Dwhere each is pan s-expression, and the identifies the%semantics of the clause, as follows:  = DO# each is evaluated in sequence = WHILE3 each is evaluated until one evaulates to NIL,+ at that point the iteration is terminated = UNTIL4 each is evaluated until one evaulates to some / non-NIL value, at that point the iteration is terminated CThese s are evaluated sequentially, then the entire Esequence is repeated unt qil either a WHILE or UNTIL clause causes the iteration to be terminated.EThe different types of s may appear in any order, and -there may be as many of each type as desired.2 AThere is one additional type of which may appear >anywhere within the loop, but is not evaluated until the loop terminates: = RESULT7 there must be exactly one , which is EVALuated to , obtain the value returned by the LOOP form7If no RESULT claruse appears, the LOOP form returns NIL.GNote that a future implementation might restrict the appearance of the ,RESULT action clause to the end of the loop. 2 Example (loop (initial n 1 sum 0) (do (setq sum (plus sum n)) (setq n (add1 n)) ) (until (greaterp n 5)) (result sum) )/ When this form is evaluated, the result is 15.ww`y<1 MAP(MAP )Type: EVAL, SPREAD;Apply to successive CDR segments of tshe list .NIL is returned.wwQ{<1 MAPC(MAPC )Type: EVAL, SPREAD;Apply to successive CAR elements of the list .NIL is returned.ww@^~<1 MAPCAN(MAPCAN )Type: EVAL, SPREAD;Apply to successive CAR elements of the list ,4and return a concatenated (NCONC'd) list of results.ww <1 MAPCAR(MAPCAR )Type: EVAL, SPREAD;Apply to successive CAR elementts of the list ,2and return a constructed (CONS'd) list of results.=Note: This definition is in agreement with Standard LISP and >the INTERLISP definition when only two arguments are supplied.4The arguments are reversed from those of MACLISP andYale/Rutgers/UCI LISP.ww <1 MAPCON(MAPCON )Type: EVAL, SPREAD;Apply to successive CDR segments of the list ,4and return a concatenated (NCONC'd) list of results.ww< 1 uMAPLIST(MAPLIST )Type: EVAL, SPREAD;Apply to successive CDR segments of the list ,2and return a constructed (CONS'd) list of results.ww<1 MAX (MAX ...)Type: EVAL, NOSPREAD,Return the numeric maximum of all arguments.This is a special form.ww<1 MAX2(MAX2 )Type: EVAL, SPREAD(Returns the larger of its two arguments.wwA<1 MEMBER(MEMBER )Type: EVAL, SPREAD7Sevarch the list for , using EQUAL to compare.:If is found, return the remainder of , else NIL. (See MEMQ)wwN<1 MEMQ(MEMQ )Type: EVAL, SPREAD4Search the list for , using EQ to compare.:If is found, return the remainder of , else NIL. (See MEMBER)ww <1 MIN (MIN ...)Type: EVAL, NOSPREAD,Return the numeric minimum of all arguments.This is a special form.ww`<1 MIN2(MwIN2 )Type: EVAL, SPREAD)Returns the smaller of its two arguments.ww<1 MINUS (MINUS )Type: EVAL, SPREAD Returns -.wwะ<1 MINUSP (MINUSP )Type: EVAL, SPREAD0Returns T if is a negative number, else NIL.ww`Ӷ<1 MKATOM (MKATOM )Type: EVAL, SPREADMake an unINTERNed atom.I is converted to a new string, which is used to form an atomic symbol.BThe result will satisfy IDP, but will not be fouxnd on the ob-list.LThis is similar to GENSYM, but for atoms of arbitrary, user specified names.wwZ<1 MKVECT(MKVECT [])Type: EVAL, SPREADEReturns a vector whose index may range over the values zero to .KIf is omitted or NIL, then the vector is untyped, i.e., each element/of the vector may be an arbitrary s-expression.7All elements of untyped vectors are initialized to NIL.<If is supplied it must be one of the following types: FIXNUyM fixed numeric FLTNUM floating point numeric8All elements of numeric vectors are initialized to zero.EIf the vector is typed, then only the appropriate type of data may bestored in the vector.$(See GETV, PUTV, UPBV, and VECTORP.)E[Note that the LISP output system prints all vectors as !*!*.ww`<1 MSG (MSG ...)Type: EVAL, NOSPREAD)MSG is a general output utility function.AIt takes an arbitrary number of arguments and treats them in the following zway:: - Explicit strings are printed without the string quotes.? - The atom T causes a new line to be started (invokes TERPRI).= - Other expressions are EVALuated and the result is printed.MSG always returns NIL.This is a special form.ww@<1 NCONC(NCONC )Type: EVAL, SPREAD?Concatenate onto the end of , without copying.ww>1 Nodes.A node is the basic storage unit used by LISP.2 Implementation+Nodes co{nsist of five (5) words [10 bytes].DThe first word is called the flag word, and contains a code used to indicate the type of the node.Current node types are: non-terminal atomic symbol integer floating point string vectorCIn addition, the high order bit is reserved for garbage collection.CThe remaining two longwords are interpreted based on the node type,>but generally they are referred to as the car and cdr fields, Erespectively for the first and second longword (afte|r the flag word).ww 0<1 NOT (NOT )Type: EVAL, SPREADReturn T if is NIL.(This is the same as NULL.)ww`=<1 NULL (NULL )Type: EVAL, SPREADReturn T if is NIL.(This is the same as NOT.)wwW< 1 NUMBERP (NUMBERP )Type: EVAL, SPREADReturns T if is a number.wwR> 1 Ob-list5The ob-list is the list of all known objects (atoms).@It is used to maintain the uniqueness of atoms} as they are read. (See OBLIST.)ww<1 OBLIST(OBLIST) Display list of defined symbols.ENote that symbols are displayed in the form that they are originally =encountered (with respect to upper and lower case alphabetic Acharacters), but they will be normally matched by a symbol lookupindependant of case. !(See INTERN, INTERNCI, INTERNCD.)ww<1 OCML(OCML )Type: EVAL, SPREADECause the next input function requiring a new line of ~input to invokeAthe indirect command file specified by , which must be of string type. (The default command file type is ".LSP".(See @, LISP_INIT.)ww@<1 ONEP (ONEP )Type: EVAL, SPREAD9Returns T if is a number, and is equal to 1 (or 1.0).Otherwise, NIL is returned.ww <1 OR (OR ...)Type: NOEVAL, NOSPREADBEvaluate the s-expressions sequentially until one is non-null,'then return its value, else return NIL.This is a special form.ww`<1 OUTF(OUTF ...)Type: NOEVAL, NOSPREADARedirect output to the file indicated by temporarily, Athen evaluate the 's, and then restore output to its previous Gdestination. The result is that the output produced by evaluating the 5's is placed in the file designated by .This is a special form.ww@;<1 OUTPUT(OUTPUT )Type: EVAL, SPREADDRedirect output to the file indicated by , and return the previous filespec string.,If evaluates to an atomic symbol,its print-name is used.7If evaluates to a string, its value is used.6Output may be redirected to the terminal by specifyingthe string "TT:". The default file type is ".LIS".wwU<1 PAIRP (PAIRP )Type: EVAL, SPREAD+Return T if is a dotted pair, else NIL.ANote that (PAIRP '()) returns NIL, since () is equivalent to NIL.%This function is equivalent to CONSP.wwc<1 PLUS (PLUS ...)Type: EVAL, NOSPREAD,Returns the arithmetic sum of all arguments.This is a special form.ww<1 PLUS2(PLUS2 )Type: EVAL, SPREAD%Returns the sum of its two arguments.ww}<1 POP (POP )Type: NOEVAL, NOSPREADFPOP is a macro (really an FSUBR) that requires its argument to be Dan atom which points to a list. POP removes the first element from Dthis list (as if it were a stack), returns this value, and modifies * to point to the remainder of the list. (See PUSH.)ww`=1 POSN(POSN)6Returns the number of characters in the output buffer.)If the buffer is empty, zero is returned.(The value returned is always an integer.(See PRIN1, PRINT, TERPRI)ww=1 PP(PP )Type: EVAL, SPREAD,Pretty print to the current output file.PP is builtin but not compiled.ww+=1 PPAUX '(PPAUX )Type: EVAL, SPREADFPPAUX is the workhorse of the pretty printing functions. It performs Gthe actual printing of the S-expression to the current output file.F indicates the character position where the first character is @to appear on the output line. If is to the left of the >current position on the output line, a new line is started by ;evaluating TERPRI. is the initial count of left Aparentheses, which is used to determine whether the S-expression Gcurrently being pretty printed will fit on a given line, including the Dright parentheses required to complete the S-expression. Normally, E should be specified as zero when being called by any other Groutine; it is used primarily for when PPAUX calls itself recursively. CIf is non-NIL, PPAUX will force output to start on a new output line."PPAUX is builtin but not compiled.PPAUX2 (PPAUX2 )EPPAUX2 works in conjunction with PPAUX to pretty print S-expressions.4It is responsible for formatting quoted expressions.ww@=1 PPD(PPD )Type: NOEVAL, NOSPREADEPretty print the definition of to the current output file.?(Note, PPD is a NOEVAL function.) If is a compiled Ffunction, an error will result. The output is in a form suitable for %input to LISP to define the function. PPD is builtin but not compiled.This is a special form.ww=1 PPI(PPI )Type: EVAL, SPREADDPretty print , indented to column , to the current output Cfile. must be a number. If is to the left of the Bcurrent character position on the output line, a new line will be started by evaluating TERPRI. PPI is builtin but not compiled.ww@=1 PPINT(PPINT )Type: EVAL, SPREADDPretty print , indented to column , to the current output Cfile. must be a number. If <start> is to the left of the Bcurrent character position on the output line, a new line will be Fstarted by evaluating TERPRI. This routine is the same as PPI except >that PPI invokes TERPRI before completion, and PPINT does not."PPINT is builtin but not compiled.ww)#=1 PPP (PPP )Type: NOEVAL, NOSPREADBPretty print the property list of to the current output file. PPP is builtin but not compiled.This is a special form.ww7&=1 PPPL (PPPL )Type: NOEVAL, NOSPREADBPretty print the property list of to the current output file.C(Note that PPPL is a NOEVAL function.) Output is in the form of a CDEFPROP function call suitable for recreating the property list of 4 if it were to be read back in to LISP as input. PPP is builtin but not compiled.This is a special form.wwQ,=1 PRIN1 (PRIN1 )Type: EVAL, SPREAD9Print the s-expression , without terminating the line.GStrings are enclosed in quotes (" characters), and embedded quotes are 3doubled, just as they must be for input using READ.GNote that any time the output buffer is non-empty and the input system Dmust obtain a new line of input, the output buffer is flushed using TERPRI.0The value returned is the value of the argument. (Seee PRIN2.)ww@y5=1 PRIN2 (PRIN2 )Type: EVAL, SPREADPrint the s-expression ,Bwithout quotes around quoted literals or doubling imbedded quotes.GNote that any time the output buffer is non-empty and the input system Dmust obtain a new line of input, the output buffer is flushed using TERPRI.0The value returned is the value of the argument. (Seee PRIN1.)ww BF=1 PRINT (PRINT )Type: EVAL, SPREAD3Print the s-expression , and terminate the line. Each atom is output using PRIN1.0The value returned is the value of the argument.ww`OI= 1 PRLENGTH(PRLENGTH )Type: EVAL, SPREAD2Return the "print" length of the s-expression .FThe "print" length is the number of characters that would be required ;to print (using PRIN1) if it would all fit on one line.=Note: PRLENGTH is intended for use with simple lists only; it3does not work for lists whose final CDR is non-NIL. (See PRIN1.)wwP=1 PROG(PROG () ...)Type: NOEVAL, NOSPREADSimulate program format.; is a list of local variables, which may be null.)Each may be either a form or an atom.%Form 's are evaluated in sequence.9Atom 's serve as labels for GO, but are not evaluated.5If a PROG form runs out of forms, it returns NIL.6A value may be returned using the special form RETURN.This is a special form.ww`U=1 PROG1(PROG1 ...)Type: EVAL, NOSPREADSimulate program format.)Each may be either a form or an atom.%Form 's are evaluated in sequence.9Atom 's serve as labels for GO, but are not evaluated.GWhen a PROG1 form runs out of forms, it returns the value obtained #during evaluation of the first .)No local variables or labels are allowed.-The special form (RETURN ) is not allowed.This is a special form.ww@Z=1 PROG2(PROG2 ...)Type: EVAL, NOSPREADSimulate program format.)Each may be either a form or an atom.%Form 's are evaluated in sequence.9Atom 's serve as labels for GO, but are not evaluated.GWhen a PROG2 form runs out of  forms, it returns the value obtained $during evaluation of the second .DIf there is only one or no 's, then it returns the value obtained9during evaluation of the first , or NIL, respectively.)No local variables or labels are allowed.-The special form (RETURN ) is not allowed.This is a special form.ww`a=1 PROGN(PROGN ...)Type: NOEVAL, NOSPREADSimulate program format.)Each may be either a form or an atom.%Form 's are evaluated in sequence.9Atom 's serve as labels for GO, but are not evaluated.GWhen a PROGN form runs out of forms, it returns the value obtained "during evaluation of the last .)No local variables or labels are allowed.-The special form (RETURN ) is not allowed.This is a special form.wwg= 1 PROMPTSTR(PROMPTSTR )Type: EVAL, SPREADESpecify a new string for interactive prompting at the terminal.ww_> 1 Properties2The following are the supported system properties:2 APVALCThis is the "value" associated with an atom when it is EVAL'd, and "there is no binding on the a-list.2 PNAME@The value of this property is a string literal which constitutes(the print-name of the symbol (see ATOM).1(See Atoms [subheading Symbols], INTERN, OBLIST.) 2 TRACEBUGEThis property indicates a special debug function name associated withGthe owner of the property. When a function is being traced (using the GTRACE facility) and the func tion has a TRACEBUG property, the value of Dthis property will be evaluated (with no arguments) during the traceDprocessing, after the traced functions name and arguments have been 3printed, but before the traced function is invoked.GFor example, to use BREAK as a TRACEBUG function, define an auxilliary .function with no arguments to invoke it, e.g., (DE BRK ()E (BREAK ">>> TRACEBUG BREAK function, return value is ignored.") )Ethen, add the tracebug function to the function being debugged, e.g., (DEFPROP BRK TRACEBUG)'where is the name of the function.1Don't forget to trace the function: (TRACE ).wwgl=1 PUSH(PUSH )Type: NOEVAL, NOSPREADGPUSH is a macro (really an FSUBR) that requires its argument to be Ean atom which points to a list. PUSH evaluates its argument @and then adds it to the beginning of the list pointed to by .DIt then modifies to point to the new first element, and returns this new value of . (See POP.)ww@r=1 PUT(PUT )Type: EVAL, SPREADAPut on on the property list of as the property./If the property already exists, it is replaced;!otherwise it is added to the end. Return . (See PUTPROP)ww w=1 PUTD(PUTD )Type: EVAL, SPREAD?Place a new function definition for on the list of definedDfunctions. is the definition of the function, and is the type of the defintion.COnly one definition may be on the d-list for each atom at any time. (See D-list, Forms, GETD, REMD.)ww`#z= 1 PUTPROP(PUTPROP )Type: EVAL, SPREADAPut on on the property list of as the property./If the property already exists, it is replaced;!otherwise it is added to the end. Return .(See DEFPROP, PUT)ww@~=1 PUTV(PUTV )Type: EVAL, SPREADCStores the in the 'd element of the vector . must be an integer. is returned.GIf is a typed vector, must be of the appropriate type.&(See MKVECT, GETV, UPBV, and VECTORP.)wwф=1 QUIT(QUIT)'Exit from LISP to the operating system.<Any output currently in the output buffer is not forced out.ww`X=1 QUOTE (QUOTE )Type: NOEVAL, NOSPREAD3QUOTE stops evaluation and returns unevaluated.CThe single quote character (') may be used as a prefix operator to #quote the S-expression it precedes.This is a special form.wwe= 1 QUOTIENT(QUOTIENT )Type: EVAL, SPREADReturn the quotient /.ww=1 RATOM(RATOM)#Read an atom, return the atom read.)(See Atoms [subheading Symbols], INTERN.)ww=1 READ(READ)/Read an s-expression, return a list or an atom.=It is possible to cause READ to translate all of its input to@upper case before interpretation by setting the special built-in%symbol !*RAISE to any non-NIL value. AThe default value for !*RAISE is NIL, resulting in no conversion to upper case.GREAD permits lists to be enclosed in either parentheses ("(" and ")"), Eand square brackets ("[" and "]"). In addition, parenthesised lists <may be terminated early using square brackets, to any depth.E.g.,E [(a b (c] == ((a b (c))), and [a (b [c (d] e] == (a (b (c (d)) e)).CAlso, the outermost list is implicitly enclosed in square brackets.E.g.,B (a (b c] == (a (b c)), and (a (b [c (d] e] == (a (b (c (d)) e)).BNote however that the list [a b) is in error; list started with a 5left bracket must be terminated with a right bracket.CNote also that any time the input system must obtain a new line of Ainput and the output buffer is non-empty (see PRIN1, PRIN2), the &output buffer is flushed using TERPRI.1(See Atoms [subheading Symbols], INTERN, UPCASE.)ww`ž=1 READCH(READCH).Read a single character; return it as an atom.Returns !$EOL!$ at end-of-line.wwI=1 READLN(READLN)3Read the current input line, return it as a string.EIf any part of the current input line has been processed by the LISP Ginput system (READ, READCH, RATOM) other than READLN, the remainder of @the current input line is discarded, and the next input line is returned.wwc= 1 RECLAIM (REC LAIM)CReclaim nodes no longer needed, i.e., invoke the garbage collector.BRECLAIM will also be called automatically (by CONS) whenever LISP 9needs another node and the node pool has been exhausted. 6This may cause (seemingly) random delays in response. :Normally, RECLAIM gives no indication it is being called, =however the special built-in variable !*GC (which is normally=set to NIL) may be modified to cause RECLAIM to indicate whenit is being called.AIf !*GC is set to T, a message will be printed each time garbage collection begins and ends.AIf !*GC is set to some s-expression, no messages will be printed,?but the s-expression will be evaluated when garbage collection 9has completed, just before RECLAIM returns to its caller.ww@= 1 REMAINDER(REMAINDER )Type: EVAL, SPREAD#Returns the remainder of /."(Both arguments must be integers.)ww=1 REMD (REMD )Type: EVAL, SPREAD.Search the list of defined functions for .EIf is not found, return NIL. If is found, return a dotted Cpair containing the function's type as its CAR, and the function's Ddefinition as its CDR, as does GETD, and remove the definition from the d-list. (See D-list, Forms, GETD, PUTD.)ww9= 1 REMFLAG(REMFLAG )Type: EVAL, SPREADGRemoves the flag from the property list of each id in .9 and each member of the list must be ids.(See FLAG and FLAGP.)wwF=1 REMOB (REMOB )Type: EVAL, SPREAD5Remove from ob-list (the list of known symbols). Return NIL.ww T= 1 REMPROP(REMPROP )Type: EVAL, SPREAD:Remove the property from the property list of . Return NIL.ww`=1 REPEAT(REPEAT ...)Type: NOEVAL, NOSPREAD;Repeat each of the forms until a termination condition.@UNTIL or WHILE special forms may be used to specify termination.CThe value returned is the result of the expression terminating the iteration.This is a special form.ww=1 RETURN (RETURN )Type: EVAL, SPREAD4Terminate PROG forms and specify a result value .ww = 1 REVERSE(REVERSE )Type: EVAL, SPREAD)Return a copy of in reverse order.ww`=1 RPLACA(RPLACA )Type: EVAL, SPREAD"Replace the car of with .ww=1 RPLACD(RPLACD )Type: EVAL, SPREAD"Replace the cdr of with .ww>1 S-expressionFBoth atoms and lists are often called s-expressions, s being short forCsymbolic. S-expressions are the data objects manipulated by LISP. ww=1 SASSOC"(SASSOC )Type: EVAL, SPREAD1Find on the list of dotted pairs .6 is matched against the car of each dotted pair.0If is found, the dotted pair is returned,else is returned. (See ASSOC.)ww =1 SET(SET )Type: EVAL, SPREAD@Change the value of the atom on the a-list to become .ww`=1 SETQ(SETQ )Type: NOEVAL, NOSPREADEquivalent to (SET ' )ww@=1 SQRT (SQRT )Type: EVAL, SPREAD*Returns the square root of the number .> is converted to floating point before extracting the root.$A floating point number is returned.ww=1 SSPAWN (SSPAWN )Type: EVAL, SPREAD<Spawns a synchronous process to perform the DCL command .0 will be converted to a string, if necessary.EThe value returned is an integer whose value is the completion statusBof the process. (See GETMSG to convert this number to a message.)ww`5=1 STATUS(STATUS)Display LISP system status.DThe size of the LISP internal call stack is displayed, including the*number of words that have never been used.JThis stack is used for function calling, including function arguments and >saving of local data values by compiled code during recursion.8Also displayed are the number of LISP nodes and symbols.JNodes are used for each LISP cell, and symbols refer to the atomic symbolson the A-list. wwO= 1 STRCONS(STRCONS ...)Type: EVAL, NOSPREADCReturns a string equivalent to concatenating each of the arguments.8The arguments will be converted to strings if necessary.This is a special form.ww> 1 STRINGP (STRINGP )Type: EVAL, SPREADReturns T if is a string.ww ]= 1 STRLENGTH(STRLENGTH )Type: EVAL, SPREADAReturn the length (in characters) of , as it would be expanded by PRIN2./ will be converted to a string if necessary.(See ATOMLENGTH.)ww@>1 SUB1 (SUB1 )Type: EVAL, SPREADReturns number -1.ww>1 SUBST(SUBST )Type: EVAL, SPREAD9Return a copy of with all 's replaced by 's.ww >1 SUBSTR"(SUBSTR )Type: EVAL, SPREAD?Return the substring of starting at character ,"which is characters long.*[The first character has an of 1.]ww&>1 TERPRI(TERPRI)Terminate the output line.ww@>1 TIMES(TIMES ...)Type: EVAL, NOSPREAD'Returns the product of all numbers .ww >1 TIMES2(TIMES2 )Type: EVAL, SPREAD&Returns the product of both arguments.ww`>1 TRACE(TRACE ...)Type: NOEVAL, NOSPREAD>Trace the invocation and arguments of the functions specified.This is a special form.ww@h> 1 TRACELIST (TRACELIST)'List all of the functions being traced.wwu >1 UNTIL UNTIL (A special form used within (REPEAT ...),2which terminates the loop when is non-null.This is a special form.ww#> 1 UNTRACE(UNTRACE [...])Type: NOEVAL, NOSPREAD2Untrace (turn off tracing of) specified functions,'or all functions if none are specified.This is a special form.ww(>1 UPBV(UPBV )Type: EVAL, SPREADAReturns the upper bound on the subscript for the vector .The result is an integer.&(See MKVECT, GETV, PUTV, and VECTORP.)ww#+>1 UPCASE(UPCASE )Type: EVAL, SPREAD)Return uppercase version of input string.!The input string is not modified.ww/> 1 VECTORP (VECTORP )Type: EVAL, SPREADReturns T if is a vector.ww@5> 1 VERSIONVERSION3An atom which has an integer value corresponding to+the version number of the LISP interpreter.ww8>1 WHILE WHILE (A special form used within (REPEAT ...),.which terminates the loop when is null.This is a special form.ww;>1 ZEROP (ZEROP )Type: EVAL, SPREAD,Return T if the number is equal to zero.ww