|The Revised Maclisp Manual||Page A-18|
Old-I/O Control Variables
|CRUNIT||Special Form||(crunit [device] [directory])|
If device and/or directory are specified, the respective components or DEFAULTF will be altered. Whether or not any change is made, a list of the form (dev dir) will be returned, indicating the currently active defaults. device and directory are not evaluated. [Note that if DEFAULTF is in a nonstandard form, CRUNIT will have the side-effect of putting it in standard namelist format.]
(CRUNIT DSK) => (DSK FOO) ; Devices are specially known
(CRUNIT BAR) => (DSK BAR) ; Unknown names are directories
(CRUNIT) => (DSK BAR) ; Just get current defaults
Opening Files for Output
|UAPPEND||Special Form||(UAPPEND . namelist)|
This is the Old-I/O way to open a file in append mode.
;;; Official definition from .INFO.;LISP NEWIO (DEFUN UAPPEND FEXPR (FILENAME) (SETQ FILENAME (*UGREAT FILENAME)) (*UWRITE FILENAME 'APPEND FILENAME)) ;;; *UWRITE is an auxiliary function not available to the user (DEFUN *UWRITE (NAME MODE NEWDEFAULT) ;Internal Routine (COND (UWRITE (SETQ OUTFILES (DELQ UWRITE OUTFILES)) (CLOSE UWRITE) (SETQ UWRITE NIL))) (PUSH (SETQ UWRITE (OPEN NAME MODE)) OUTFILES) (CAR (DEFAULTF NEWDEFAULT)))
|UWRITE||Special Form||(UWRITE [device] [directory])|
Opens an output file. When done with this file, UFILE must be used to close it and give it a name. The arguments are the last two elements of a 4-list, specifying the device and directory on which the file is to be written. The first two parts of the 4-list are not specified until the file is UFILE'd.
;;; See UAPPEND info for description of *UWRITE (DEFUN UWRITE FEXPR (DEVDIR), (IF (NOT DEVDIR) (SETQ DEVDIR (CAR (DEFAULTF NIL)))) (*UWRITE (CONS DEVDIR (CASEQ (STATUS FILESYSTEM-TYPE) ((DEC10) (CONS (STATUS JNAME) '(OUT))) ((DEC20) '(MACLISP OUTPUT)) ((ITS) '(/.LISP/. OUTPUT)))) 'OUT (NCONS DEVDIR)))
Opening Files for Input
|UREAD||Special Form||(UREAD . filename)|
This function selects an input file. The argument list is a 4-list as described above. The specified file is made the default input source. Note that the ^Q switch must be turned on before input will be automatically taken from this file.
Closes file, if any, that has been opened by UREAD.
|UFILE||Special Form||(UFILE . shortnamelist)|
Closes the UWRITE output file and gives it the name specified by shortnamelist.
(DEFUN UFILE FEXPR (SHORTNAME) (COND ((NULL UWRITE) (ERROR '|NO UWRITE FILE| (CONS 'UFILE SHORTNAME) 'IO-LOSSAGE)) (T (PROG1 (DEFAULTF (RENAMEF UWRITE (*UGREAT SHORTNAME))) (SETQ OUTFILES (DELQ UWRITE OUTFILES)) (SETQ UWRITE NIL) (OR OUTFILES (SETQ ^R NIL)))))) ;;; *UGREAT is an auxiliary function not available to the user (DEFUN *UGREAT (NAME) ;INTERNAL ROUTINE (MERGEF NAME (COND ((STATUS FEATURE DEC10) '(* . LSP)) ((STATUS FEATURE DEC20) '(* MACLISP *)) ((STATUS FEATURE ITS) '(* . >)))))
External File Manipulation
|UKILL||Special Form||(UKILL . namelist)|
Like UREAD, deletes the file specified by namelist.
|UPROBE||Special Form||(UPROBE . namelist)|
Old-I/O Status Options
|UREAD||Status Option||(STATUS UREAD)|
|UREAD||SStatus Option||(SSTATUS UREAD . namelist)|
Archaic. Included for compatibility with Old-I/O syntax. Rewrite your code to call (UREAD . namelist) and see documentation on the UREAD function as a first approximation toward modernization. The better thing to do, however, is to read the section on New-I/O and use the concepts presented there rather than concepts like these. Argument positions are not evaluated.
|UWRITE||Status Option||(STATUS UWRITE)|
Archaic. Returns the corresponding list for the current UWRITE output destination.
|UWRITE||SStatus Option||(SSTATUS UWRITE . namelist)|
Archaic. Included for compatibility with Old-I/O syntax. Rewrite your code to call (UWRITE . namelist) and see documentation on the UWRITE function as a first approximation toward modernization. The better thing to do, however, is to read the section on New-I/O and use the concepts presented there rather than concepts like these. Argument positions are not evaluated.
|CRFILE||Status Option||(STATUS CRFILE)|
Archaic. Returns a 2-list giving the file names for the current file in the UREAD I/O system.
|CRFILE||SStatus Option||(SSTATUS CRFILE . filespec)|
|CRUNIT||Status Option||(STATUS CRUNIT)|
|CRUNIT||SStatus Option||(SSTATUS CRUNIT . crunitspec)|
Archaic. Included for compatibility with Old-I/O syntax. Rewrite your code to call (CRUNIT . crunitspec) and see documentation on the CRUNIT function as a first approximation toward modernization. The better thing to do, however, is to read the section on New-I/O and use the concepts presented there rather than concepts like these. Argument positions are not evaluated.
(CRUNIT . crunitspec)
Obsolete Status Options
We use the term obsolete here to mean that a functionality no longer exists at all. It is distinguished from archaic which is something being phased out. None of the following exist in Maclisp any more:
|IOC||Status Option||(STATUS IOC ...)|
|PAGEPAUSE||Status Option||(STATUS PAGEPAUSE ...)|
Obsolete. Superseded by the ENDPAGEFN facility.
|INTERRUPT||Status Option||(STATUS INTERRUPT)|
The INTERRUPT option to STATUS used to control a number of service functions for interesting conditions that might arise. The conditions were known by their number. Names have now been given to each of the functionalities; you'll have to look under the particular documentation for each to see how the syntax/semantics have changed. The places to look are the ENDPAGEFN function, the TTYINT option to STATUS and SSTATUS, and the values of the variables ALARMCLOCK (interrupt 3), ERRSET (4), UNDF-FNCTN (5), UNBND-VRBL (6), WRNG-TYPE-ARG (7), UNSEEN-GO-TAG (8), WRNG-NO-ARGS (9), GC-LOSSAGE (10), FAIL-ACT (11), IO-LOSSAGE (12), *RSET-TRAP (19), and GC-DAEMON (20). The variables AUTOLOAD, CLI-MESSAGE, GC-OVERFLOW, MAR-BREAK and PDL-OVERFLOW also belong in that set; I'm not sure of their numbers.
|The Revised Maclisp Manual (Sunday Morning Edition)|
Published Sunday, December 16, 2007 06:17am EST, and updated Sunday, July 6, 2008.