The pymdl book

Appendix A. The SUBRs and FSUBRs

This catalogue lists pymdl's built-ins in ASCII order by name. The historical argument list, DECL, and description appear first where available. Implementation information follows: SUBR or FSUBR, the module that defines it, the first line of that definition's docstring, and whether the 55's own argument checks are tabled for it (subrs/argcheck.py: a checked SUBR refuses what MDL 55 refused, by name).

Generated from the registry of a fresh interpreter by tools/book_gen.py; 349 builtins, 275 manual entries.

&

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/io.

&1

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/io.

*

* ("TUPLE" FACTORS)
 #DECL ((VALUE) <OR FIX FLOAT>
        (FACTORS) <TUPLE [REST <OR FIX FLOAT>]>)

multiplies all arguments together (arithmetic)

pymdl: SUBR in subrs/arith.

+

+ ("TUPLE" TERMS)
 #DECL ((VALUE) <OR FIX FLOAT>
        (TERMS) <TUPLE [REST <OR FIX FLOAT>]>)

adds all arguments together (arithmetic)

pymdl: SUBR in subrs/arith.

-

- ("OPTIONAL" MINUEND "TUPLE" SUBTRAHENDS)
 #DECL ((VALUE) <OR FIX FLOAT>
        (MINUEND) <OR FIX FLOAT>
        (SUBTRAHENDS) <TUPLE [REST <OR FIX FLOAT>]>)

subtracts other arguments from first argument (arithmetic)

pymdl: SUBR in subrs/arith.

/

/ ("OPTIONAL" DIVIDEND "TUPLE" DIVISORS)
 #DECL ((VALUE) <OR FIX FLOAT>
        (DIVIDEND) <OR FIX FLOAT>
        (DIVISORS) <TUPLE [REST <OR FIX FLOAT>]>)

divides first argument by other arguments (arithmetic)

pymdl: SUBR in subrs/arith.

0?

0? (NUMBER)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (NUMBER) <OR FIX FLOAT>)

tells whether a number is zero (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

1?

1? (NUMBER)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (NUMBER) <OR FIX FLOAT>)

tells whether a number is one (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

1STEP

1STEP (PROCESS)
 #DECL ((VALUE PROCESS) PROCESS)

causes a PROCESS to enter single-step mode

pymdl: SUBR in subrs/process. <1STEP process> -- put process into single-step mode and return it

==?

==? (OBJECT-1 OBJECT-2)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT-1 OBJECT-2) ANY)

tells whether two objects are "exactly" equal (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

=?

=? (OBJECT-1 OBJECT-2)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT-1 OBJECT-2) ANY)

tells whether two objects are "structurally" equal (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

ABS

ABS (NUMBER)
 #DECL ((VALUE) <OR FIX FLOAT>
        (NUMBER) <OR FIX FLOAT>)

returns absolute value of a number (arithmetic)

pymdl: SUBR in subrs/arith; the 55's argument checks apply.

ACCESS

ACCESS (CHANNEL ACCESS-POINTER)
 #DECL ((VALUE CHANNEL) CHANNEL
        (ACCESS-POINTER) FIX)

sets access pointer for next I/O transfer via a CHANNEL

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. — seek to byte n (random access; RECORD positions the

ACTIVATE-CHARS

ACTIVATE-CHARS ("OPTIONAL" STRING)
 #DECL ((VALUE STRING) STRING)

sets or returns interrupt characters for terminal typing (Tenex and

pymdl: SUBR in subrs/interrupts. -- set the characters that cause a "CHAR" input

AGAIN

AGAIN ("OPTIONAL" (ACTIVATION .LPROG\ !-INTERRUPTS))
 #DECL ((VALUE) ANY
        (ACTIVATION) ACTIVATION)

resumes execution at the given ACTIVATION

pymdl: SUBR in subrs/control.

ALLTYPES

ALLTYPES ()
 #DECL ((VALUE) <VECTOR [REST ATOM]>)

returns the VECTOR of all type names

pymdl: SUBR in subrs/type_ops; the 55's argument checks apply.

AND

AND ("ARGS" ARGS)
 #DECL ((VALUE) <OR FALSE ANY>
        (ARGS) LIST)

computes logical "and" of truth-values, evaluated by the Subroutine

pymdl: FSUBR in subrs/control.

AND?

AND? ("TUPLE" TUPLE)
 #DECL ((VALUE) <OR FALSE ANY>
        (TUPLE) TUPLE)

computes logical "and" of truth-values, evaluated at call time

pymdl: SUBR in subrs/pred.

ANDB

ANDB ("TUPLE" WORDS)
 #DECL ((VALUE) WORD
        (WORDS) <TUPLE [REST <PRIMTYPE WORD>]>)

computes bitwise "and" of machine words

pymdl: SUBR in subrs/arith.

APPLICABLE?

APPLICABLE? (OBJECT)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT) ANY)

tells whether argument is applicable (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

APPLY

APPLY (APPLICABLE "TUPLE" ARGUMENTS)
 #DECL ((VALUE) ANY
        (APPLICABLE) APPLICABLE (ARGUMENTS) TUPLE)

applies first argument to the other arguments

pymdl: SUBR in subrs/control.

APPLYTYPE

APPLYTYPE (TYPE "OPTIONAL" HOW)
 #DECL ((VALUE) <OR ATOM APPLICABLE '#FALSE ()>
        (TYPE) ATOM (HOW) <OR ATOM APPLICABLE>)

specifies or returns how a data type is applied

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. <APPLYTYPE type [how]> (ch6.4.4): declare how a TYPE is applied -- as

ARGS

ARGS (CALL)
 #DECL ((VALUE) TUPLE
        (CALL) <OR FRAME ENVIRONMENT ACTIVATION PROCESS>)

returns arguments of a given un-returned Subroutine call

pymdl: SUBR in subrs/control; the 55's argument checks apply. -- the argument TUPLE of that frame's call (ch16): a

ASCII

ASCII (CODE-OR-CHARACTER)
 #DECL ((VALUE) <OR CHARACTER FIX>
        (CODE-OR-CHARACTER) <OR FIX CHARACTER>)

returns CHARACTER with given ASCII code or vice versa

pymdl: SUBR in subrs/core; the 55's argument checks apply. -> CHARACTER for that code; -> its FIX code.

ASSIGNED?

ASSIGNED? (ATOM "OPTIONAL" ENV)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (ATOM) ATOM (ENV) <OR FRAME ENVIRONMENT ACTIVATION PROCESS>)

tells whether an ATOM has a local value (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

ASSOCIATED?

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/assoc.

ASSOCIATIONS

ASSOCIATIONS ()
 #DECL ((VALUE) <OR ASOC '#FALSE ()>)

returns the first object in the association chain

pymdl: SUBR in subrs/assoc; the 55's argument checks apply. The first ASOC in the global association chain, or #FALSE. The chain is

AT

AT (STRUCTURED "OPTIONAL" (N 1))
 #DECL ((VALUE) LOCATIVE
        (STRUCTURED) STRUCTURED (N) <OR FIX OFFSET>)

returns a locative to the Nth element of a structure

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. Locative to the Nth element of a structure (LOCL/LOCV/LOCU/LOCS/LOCA).

ATAN

ATAN (NUMBER)
 #DECL ((VALUE) FLOAT
        (NUMBER) <OR FIX FLOAT>)

returns arc tangent of a number (arithmetic)

pymdl: SUBR in subrs/transcend; the 55's argument checks apply.

ATOM

ATOM (PNAME)
 #DECL ((VALUE) ATOM
        (PNAME) STRING)

creates an ATOM with a given name

pymdl: SUBR in subrs/core; the 55's argument checks apply. -- a brand-new ATOM of that PNAME, guaranteed on no OBLIST

AVALUE

AVALUE (ASSOCIATION)
 #DECL ((VALUE) ANY
        (ASSOCIATION) ASOC)

returns the "value" field of an association

pymdl: SUBR in subrs/assoc; the 55's argument checks apply.

BACK

BACK (STRUCTURE "OPTIONAL" N)
 #DECL ((VALUE) <OR VECTOR TUPLE UVECTOR STORAGE STRING BYTES TEMPLATE>
        (N) FIX
        (STRUCTURE) <OR <PRIMTYPE VECTOR>  <PRIMTYPE TUPLE>
                        <PRIMTYPE UVECTOR> <PRIMTYPE STORAGE>
                        <PRIMTYPE STRING>  <PRIMTYPE BYTES>
                        <PRIMTYPE TEMPLATE>>)

replaces some elements removed from a non-list structure by RESTing and changes to primitive data type

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

BIND

BIND ("ARGS" ARGS)
 #DECL ((VALUE) ANY
        (ARGS) <LIST [OPT ATOM] LIST [OPT DECL] ANY>)

executes sequential expressions without providing a bound ACTIVATION

pymdl: FSUBR in subrs/control.

BITS

BITS (WIDTH "OPTIONAL" (RIGHT-EDGE 0))
 #DECL ((VALUE) BITS
        (WIDTH RIGHT-EDGE) FIX)

creates a bit mask for PUTBITS and GETBITS

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. -> a BITS (ch18.2): a PDP-10 byte pointer, PRIMTYPE

BLOAT

BLOAT ("OPTIONAL"
       (FREE 0) (STACK 0) (LOCALS 0) (GLOBALS 0) (TYPES 0) (STORAGE 0) (P-STACK 0)
       MIN GROW-LOCAL GROW-GLOBAL GROW-TYPE GROW-STORAGE PURE P-STACK-SIZE STACK-SIZE)
 #DECL ((VALUE) FIX
        (FREE STACK LOCALS GLOBALS TYPES STORAGE P-STACK MIN GROW-LOCAL GROW-GLOBAL
         GROW-TYPE GROW-STORAGE PURE P-STACK-SIZE STACK-SIZE) FIX)

allocates extra storage temporarily

pymdl: SUBR in subrs/storage.

BLOAT-STAT

BLOAT-STAT ("OPTIONAL" STATS)
 #DECL ((VALUE) <UVECTOR [27 FIX]>
        (STATS) <UVECTOR [27 ANY]>)

gives garbage-collector and storage statistics

pymdl: SUBR in subrs/storage. (ch22.7) -- fill a length-27 UTYPE-FIX UVECTOR

BLOCK

BLOCK (LOOK-UP)
 #DECL ((VALUE LOOK-UP) <OR OBLIST <LIST [REST <OR OBLIST 'DEFAULT>]>>)

SETs OBLIST for looking up ATOMs during READing and PARSEing

pymdl: SUBR in subrs/system; the 55's argument checks apply. <BLOCK (oblist ...)> -- bind the reader's current OBLIST path (.OBLIST).

BOUND?

BOUND? (ATOM "OPTIONAL" ENV)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (ATOM) ATOM (ENV) <OR FRAME ENVIRONMENT ACTIVATION PROCESS>)

tells whether an ATOM is locally bound (predicate)

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

BREAK-SEQ

BREAK-SEQ (OBJECT PROCESS)
 #DECL ((VALUE PROCESS) PROCESS
        (OBJECT) ANY)

modifies execution sequence of another PROCESS

pymdl: SUBR in subrs/process. -- arrange that when process (RESUMABLE) is next

BUFOUT

BUFOUT ("OPTIONAL" (CHANNEL .OUTCHAN))
 #DECL ((VALUE CHANNEL) CHANNEL)

writes out all internal MDL buffers for an output CHANNEL

pymdl: SUBR in subrs/channels. — flush a write channel's buffered output to disk without

BYTE-SIZE

BYTE-SIZE (BYTES)
 #DECL ((VALUE) FIX
        (BYTES) BYTES)

returns size of bytes in a byte-string

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. — the bit-width of each byte.

BYTES

BYTES (SIZE "TUPLE" ELEMENTS)
 #DECL ((VALUE) BYTES
        (SIZE) FIX (ELEMENTS) <TUPLE [REST FIX]>)

creates a byte-string from explicit arguments

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. <BYTES size byte ...> — a byte-string of SIZE-bit FIX bytes (masked).

CHANLIST

CHANLIST ()
 #DECL ((VALUE) <LIST [REST CHANNEL]>)

returns a LIST of currently open I/O CHANNELs

pymdl: SUBR in subrs/channels; the 55's argument checks apply. — a LIST of the currently-open CHANNELs; "the first two

CHANNEL

CHANNEL ("OPTIONAL" (MODE "READ") "TUPLE" FILE-NAME)
 #DECL ((VALUE) CHANNEL
        (MODE) STRING (FILE-NAME) TUPLE)

creates an unopened I/O CHANNEL

pymdl: SUBR in subrs/builtins2. -- a CHANNEL created WITHOUT opening (ch11.2.1):

CHTYPE

CHTYPE (OBJECT TYPE)
 #DECL ((VALUE) ANY
        (OBJECT) ANY (TYPE) ATOM)

makes a new pair with a given data type from an old one

pymdl: SUBR in subrs/type_ops; the 55's argument checks apply.

CHUTYPE

CHUTYPE (UVECTOR TYPE)
 #DECL ((VALUE UVECTOR) <PRIMTYPE UVECTOR>
        (TYPE) ATOM)

changes the data type of the elements of a uniform vector

pymdl: SUBR in subrs/type_ops; the 55's argument checks apply.

CLOSE

CLOSE (CHANNEL)
 #DECL ((VALUE CHANNEL) CHANNEL)

closes an I/O CHANNEL

pymdl: SUBR in subrs/channels; the 55's argument checks apply.

CLOSURE

CLOSURE (FUNCTION "TUPLE" VARIABLES)
 #DECL ((VALUE) CLOSURE
        (FUNCTION) FUNCTION (VARIABLES) <TUPLE [REST ATOM]>)

"binds" the free variables of a FUNCTION to current values

pymdl: SUBR in subrs/control; the 55's argument checks apply. — a CLOSURE that captures each ATOM's current

COND

COND ("ARGS" CLAUSES)
 #DECL ((VALUE) ANY
        (CLAUSES) <LIST <LIST <OR FALSE ANY>> [REST <LIST <OR FALSE ANY>>]>)

evaluates conditions and selected expression

pymdl: FSUBR in subrs/control.

CONS

CONS (NEW-ELEMENT LIST)
 #DECL ((VALUE) LIST
        (NEW-ELEMENT) ANY (LIST) LIST)

adds an element to the front of a LIST

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

COS

COS (NUMBER)
 #DECL ((VALUE) FLOAT
        (NUMBER) <OR FIX FLOAT>)

returns cosine of a number (arithmetic)

pymdl: SUBR in subrs/transcend; the 55's argument checks apply.

CRLF

CRLF ("OPTIONAL" (CHANNEL .OUTCHAN))
 #DECL ((VALUE) 'T
        (CHANNEL) CHANNEL)

prints a carriage-return and line-feed via an output CHANNEL

pymdl: SUBR in subrs/io; the 55's argument checks apply.

DATFILE-LOAD

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. <DATFILE-LOAD package library-spec [datfile-spec]> -- the core of

DECL-CHECK

DECL-CHECK ("OPTIONAL" SWITCH)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (SWITCH) <OR FALSE ANY>)

enables or disables type-declaration checking

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. — turn DECL enforcement on/off and return the previous

DECL?

DECL? (OBJECT PATTERN)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT) ANY (PATTERN) <OR ATOM FORM>)

tells whether an object matches a type declaration (predicate)

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. True if OBJECT matches the type-declaration PATTERN (ch14). DECL? checks

DEFINE

DEFINE ('NAME "ARGS" ARGS)
 #DECL ((VALUE) ATOM
        (NAME) ANY (ARGS) <LIST [OPT ATOM] LIST [OPT DECL] ANY>)

sets the global value of an ATOM to a FUNCTION

pymdl: FSUBR in subrs/control.

DEFMAC

DEFMAC ('NAME "ARGS" ARGS)
 #DECL ((VALUE) ATOM
        (NAME) ANY (ARGS) <LIST [OPT ATOM] LIST [OPT DECL] ANY>)

sets the global value of an ATOM to a MACRO

pymdl: FSUBR in subrs/control.

DEMSIG

DEMSIG (NAME)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (NAME) STRING)

signals an ITS daemon

pymdl: SUBR in subrs/system. -- signal a system daemon to run; T if it exists,

DISABLE

DISABLE (INTERRUPT)
 #DECL ((VALUE INTERRUPT) IHEADER)

disables an interrupt

pymdl: SUBR in subrs/interrupts; the 55's argument checks apply.

DISMISS

DISMISS (VAL "OPTIONAL" ACTIVATION INT-LEVEL)
 #DECL ((VALUE VAL) ANY
        (ACTIVATION) ACTIVATION (INT-LEVEL) FIX)

dismisses an interrupt occurrence

pymdl: SUBR in subrs/interrupts. (ch21.7.3). With an activation, it

DSKDATE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/builtins2. -- the current date-time as an ITS disk-date word.

ECHOPAIR

ECHOPAIR (IN OUT)
 #DECL ((VALUE IN) CHANNEL
        (OUT) CHANNEL)

coordinates I/O CHANNELs for echoing characters on rubout

pymdl: SUBR in subrs/channels; the 55's argument checks apply. -- tie an input CHANNEL to the output CHANNEL its editing

EMPTY?

EMPTY? (OBJECT)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT) STRUCTURED)

tells whether a structure has zero elements (predicate)

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

ENABLE

ENABLE (INTERRUPT)
 #DECL ((VALUE INTERRUPT) IHEADER)

enables an interrupt

pymdl: SUBR in subrs/interrupts; the 55's argument checks apply.

END-PACKAGE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/oblist. -- end the current package, restoring the prior .OBLIST.

ENDBLOCK

ENDBLOCK ()
 #DECL ((VALUE) <OR OBLIST <LIST [REST <OR OBLIST 'DEFAULT>]>>)

restores the .OBLIST that existed before corresponding call to BLOCK

pymdl: SUBR in subrs/system. -- restore the OBLIST path bound by the matching and

ENDPACKAGE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/oblist. -- end the current package, restoring the prior .OBLIST.

ENTRY

Additional built-in; implementation details follow.

pymdl: FSUBR in subrs/oblist. -- declare ATOMs as the package's external entries: move

ENTRY-LOC

ENTRY-LOC (ENTRY)
 #DECL ((VALUE) FIX
        (ENTRY) RSUBR-ENTRY)

returns the offset in the code vector of an RSUBR-ENTRY

pymdl: SUBR in subrs/rsubrs; the 55's argument checks apply. -> the entry's offset into its RSUBR (ch19.7).

EQVB

EQVB ("TUPLE" WORDS)
 #DECL ((VALUE) WORD
        (WORDS) <TUPLE [REST <PRIMTYPE WORD>]>)

computes bitwise "equivalence" of machine words

pymdl: SUBR in subrs/arith. EQV folded LEFT, not "NOT of the XOR of all" -- the two agree at two

ERRET

ERRET ("OPTIONAL" VAL (FRAME .LERR\ !-INTERRUPTS))
 #DECL ((VALUE) ANY
        (VAL) ANY (FRAME) FRAME)

continues evaluation from the last ERROR or LISTEN or from a given FRAME

pymdl: SUBR in subrs/errctl. <ERRET value [frame]> -- strip the control stack to frame (default: the

ERROR

ERROR ("TUPLE" INFO)
 #DECL ((VALUE) ANY
        (INFO) TUPLE)

stops and informs user of an error

pymdl: SUBR in subrs/errctl. <ERROR ...> -- signal an error. It first fires the "ERROR" interrupt

ERRORS

ERRORS ()
 #DECL ((VALUE) OBLIST)

returns the OBLIST where error messages are located

pymdl: SUBR in subrs/oblist; the 55's argument checks apply. -> the OBLIST where error-message names are kept (ch16/appendix-4).

EVAL

EVAL (ANY "OPTIONAL" ENV)
 #DECL ((VALUE) ANY
        (ENV) <OR FRAME ENVIRONMENT ACTIVATION PROCESS>)

evaluates an expression in a given environment

pymdl: SUBR in subrs/control; the 55's argument checks apply.

EVALTYPE

EVALTYPE (TYPE "OPTIONAL" HOW)
 #DECL ((VALUE) <OR ATOM APPLICABLE '#FALSE ()>
        (TYPE) ATOM (HOW) <OR ATOM APPLICABLE>)

specifies or returns how a data type is evaluated

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. <EVALTYPE type [how]> (ch6.4.4): declare how a TYPE is EVALuated -- as

EVENT

EVENT (NAME "OPTIONAL" PRIORITY WHICH)
 #DECL ((VALUE) IHEADER
        (NAME) <OR STRING ATOM IHEADER> (PRIORITY) FIX (WHICH) <OR CHANNEL LOCATIVE>)

sets up an interrupt

pymdl: SUBR in subrs/interrupts; the 55's argument checks apply. -> an enabled IHEADER (created+associated, or

EXP

EXP (NUMBER)
 #DECL ((VALUE) FLOAT
        (NUMBER) <OR FIX FLOAT>)

returns "e" to the power of a number (arithmetic)

pymdl: SUBR in subrs/transcend; the 55's argument checks apply.

EXPAND

EXPAND (ANY)
 #DECL ((VALUE) ANY
        (ANY) ANY)

evaluates its argument (only once if a MACRO is involved) in the top-level environment

pymdl: SUBR in subrs/control. — the FIRST of a MACRO's two EVALs (ch17.2.1): if FORM is a

FILE-EXISTS?

FILE-EXISTS? ("TUPLE" FILE-NAME)
 #DECL ((VALUE) <OR 'T <FALSE STRING FIX>>
        (FILE-NAME) TUPLE)

tests for existence of a file (predicate)

pymdl: SUBR in subrs/channels. <FILE-EXISTS? name1 name2 dev snm> — T if the named file exists under the

FILE-LENGTH

FILE-LENGTH (INCH)
 #DECL ((VALUE) FIX
        (INCH) CHANNEL)

returns the system-provided length of a file open on an input CHANNEL

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply.

FILECOPY

FILECOPY ("OPTIONAL" (INCH .INCHAN) (OUCH .OUTCHAN))
 #DECL ((VALUE) FIX
        (INCH OUCH) CHANNEL)

copies characters from one CHANNEL to another until end-of-file on the input CHANNEL

pymdl: SUBR in subrs/io. — copy characters from input to output until EOF on

FIX

FIX (NUMBER)
 #DECL ((VALUE) FIX
        (NUMBER) <OR FLOAT FIX>)

returns integer part of a number (arithmetic)

pymdl: SUBR in subrs/arith; the 55's argument checks apply. : MDL 55 FLOORS -- its KA10 has no FIX instruction, and

FLAGWORD

Additional built-in; implementation details follow.

pymdl: FSUBR in subrs/prelude. <FLAGWORD NAME1 tester1 NAME2 tester2 ...> — bind each NAMEi to bit i.

FLATSIZE

FLATSIZE (ANY MAX "OPTIONAL" (RADIX 10))
 #DECL ((VALUE) <OR FIX '#FALSE ()>
        (ANY) ANY (MAX RADIX) FIX)

returns number of characters needed to PRIN1 an object, if not greater than given maximum

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. <FLATSIZE object max [radix]> (11.1.2.5) -- the printed length, or

FLOAD

FLOAD ("TUPLE" FILE-NAME-AND-LOOK-UP)
 #DECL ((VALUE) '"DONE"
        (FILE-NAME-AND-LOOK-UP) TUPLE)

reads and evaluates all objects in a file

pymdl: SUBR in subrs/spec_subrs. — READ and EVAL every object in the named file,

FLOAT

FLOAT (NUMBER)
 #DECL ((VALUE) FLOAT
        (NUMBER) <OR FIX FLOAT>)

returns floating-point value of a number (arithmetic)

pymdl: SUBR in subrs/arith; the 55's argument checks apply.

FORM

FORM ("TUPLE" ELEMENTS)
 #DECL ((VALUE) FORM
        (ELEMENTS) TUPLE)

creates a FORM from explicit arguments

pymdl: SUBR in subrs/struc.

FRAME

FRAME ("OPTIONAL" (FRAME .LERR\ !-INTERRUPTS))
 #DECL ((VALUE) FRAME
        (FRAME) <OR FRAME ENVIRONMENT ACTIVATION PROCESS>)

returns a previous Subroutine call

pymdl: SUBR in subrs/control; the 55's argument checks apply. <FRAME [frame]> -- given a FRAME, the one stacked BEFORE it (a level

FREE-RUN

FREE-RUN (PROCESS)
 #DECL ((VALUE) <OR PROCESS '#FALSE ()>
        (PROCESS) PROCESS)

causes a PROCESS to leave single-step mode

pymdl: SUBR in subrs/process. -- take process out of single-step mode (ch20.7.7).

FREEZE

FREEZE (STRUCTURE)
 #DECL ((VALUE) <OR VECTOR UVECTOR STRING BYTES>
        (STRUCTURE) <OR <PRIMTYPE VECTOR> <PRIMTYPE TUPLE> <PRIMTYPE UVECTOR>
                        <PRIMTYPE STRING> <PRIMTYPE BYTES>>)

makes copy of argument in non-moving garbage-collected space

pymdl: SUBR in subrs/rsubrs. (ch22.2.1) -- COPY the argument (PRIMTYPE VECTOR/UVECTOR/

FSAVE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/builtins2. <SAVE [filespec] [gc?]> -> snapshot the whole state; return "SAVED".

FUNCT

FUNCT (FRAME)
 #DECL ((VALUE) ATOM
        (FRAME) <OR FRAME ENVIRONMENT ACTIVATION PROCESS>)

returns Subroutine name of a given previous Subroutine call

pymdl: SUBR in subrs/control; the 55's argument checks apply. -- the ATOM whose value was applied in that frame (ch16).

FUNCTION

FUNCTION ("ARGS" ARGS)
 #DECL ((VALUE) FUNCTION
        (ARGS) <LIST [OPT ATOM] LIST [OPT DECL] ANY>)

creates a FUNCTION

pymdl: FSUBR in subrs/control.

G=?

G=? (NUMBER-1 NUMBER-2)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (NUMBER-1 NUMBER-2) <OR FIX FLOAT>)

tells whether first argument is greater than or equal to second (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

G?

G? (NUMBER-1 NUMBER-2)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (NUMBER-1 NUMBER-2) <OR FIX FLOAT>)

tells whether first argument is greater than second (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

GASSIGNED?

GASSIGNED? (ATOM)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (ATOM) ATOM)

tells whether an ATOM has a global value (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

GBOUND?

GBOUND? (ATOM)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (ATOM) ATOM)

tells whether an ATOM ever had a global value (predicate)

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

GC

GC ("OPTIONAL" MIN (EXHAUSTIVE? <>) MS-FREQ)
 #DECL ((VALUE) FIX
        (MIN MS-FREQ) FIX (EXHAUSTIVE?) <OR FALSE ANY>)

causes a garbage collection and changes garbage-collection parameters

pymdl: SUBR in subrs/storage. <GC min exh? ms-freq> (ch22.5) -- run the garbage collector now; returns

GC-DUMP

GC-DUMP (ANY PRINTB)
 #DECL ((VALUE) <OR ANY <UVECTOR <PRIMTYPE WORD>>>
        (ANY) ANY (PRINTB) <OR CHANNEL FALSE>)

dumps an object so that it can be reproduced exactly

pymdl: SUBR in subrs/io. — dump an object for GC-READ

GC-MON

GC-MON ("OPTIONAL" SWITCH)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (SWITCH) <OR FALSE ANY>)

turns garbage-collection monitoring off or on

pymdl: SUBR in subrs/spec_subrs. (ch22.8) -- toggle printing monitor lines when a garbage

GC-MOND

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/spec_subrs. (ch22.8) -- toggle printing monitor lines when a garbage

GC-READ

GC-READ (READB "OPTIONAL" (EOF-ROUTINE '<ERROR ...>))
 #DECL ((VALUE) ANY
        (READB) CHANNEL (EOF-ROUTINE) ANY)

inputs an object that was previously GC-DUMPed

pymdl: SUBR in subrs/io. — read one object dumped by GC-DUMP (ch11.5.2).

GDECL

GDECL ("ARGS" ARGS)
 #DECL ((VALUE) ANY
        (ARGS) <LIST [REST <LIST [REST ATOM]> <OR ATOM FORM>]>)

declares the type/structure of the global value of ATOMs

pymdl: FSUBR in subrs/oblist. <GDECL (atom...) decl (atom...) decl ...> — record the DECL of each atom's

GET

GET (ITEM INDICATOR "OPTIONAL" (IF-NONE <>))
 #DECL ((VALUE) ANY
        (ITEM) <OR STRUCTURED ANY> (INDICATOR) <OR FIX OFFSET ANY> (IF-NONE) ANY)

does NTH or GETPROP

pymdl: SUBR in subrs/struc; the 55's argument checks apply. <GET item indicator [exp]>: uses NTH if item is structured and indicator

GET-DECL

GET-DECL (ATOM-OR-OFFSET)
 #DECL ((VALUE) <OR ATOM FORM '#FALSE ()>
        (ATOM-OR-OFFSET) <OR LOCD OFFSET>)

gets the type declaration for an ATOM's value or an OFFSET

pymdl: SUBR in subrs/oblist; the 55's argument checks apply. — the DECL Pattern of an OFFSET, of an ATOM's

GET-MUDDLE-SUBR

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/squoze. -- the ATOM naming the interpreter SUBR whose

GETBITS

GETBITS (FROM FIELD)
 #DECL ((VALUE) WORD
        (FROM) <OR <PRIMTYPE WORD> <PRIMTYPE STORAGE>> (FIELD) BITS)

returns a bit field of a machine word or STORAGE address

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply.

GETL

GETL (ITEM INDICATOR "OPTIONAL" (IF-NONE <>))
 #DECL ((VALUE) <OR LOCATIVE LOCAS ANY>
        (ITEM) <OR STRUCTURED ANY> (INDICATOR) <OR FIX OFFSET ANY> (IF-NONE) ANY)

does AT or GETPL

pymdl: SUBR in subrs/assoc; the 55's argument checks apply. <GETL item indicator [if-none]> — like GET: a structure-element locative

GETPL

GETPL (ITEM INDICATOR "OPTIONAL" (IF-NONE <>))
 #DECL ((VALUE) <OR LOCAS ANY>
        (ITEM INDICATOR IF-NONE) ANY)

returns a locative to an association

pymdl: SUBR in subrs/assoc; the 55's argument checks apply. <GETPL item indicator [if-none]> — a locative (LOCAS) to the association's

GETPROP

GETPROP (ITEM INDICATOR "OPTIONAL" (IF-NONE <>))
 #DECL ((VALUE) ANY
        (ITEM INDICATOR IF-NONE) ANY)

returns the value associated with an item under an indicator

pymdl: SUBR in subrs/assoc; the 55's argument checks apply.

GLOC

GLOC (ATOM "OPTIONAL" (MAKE-SLOT <>))
 #DECL ((VALUE) LOCD
        (ATOM) ATOM (MAKE-SLOT) <OR FALSE ANY>)

returns a locative to the global-value cell of an ATOM

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. Locative (LOCD) to an ATOM's GVAL slot. With a true 2nd arg, create the

GO

GO (LABEL)
 #DECL ((VALUE) ANY
        (LABEL) <OR ATOM TAG>)

goes to a label and continues evaluation from there

pymdl: SUBR in subrs/control; the 55's argument checks apply. <GO atom|tag> — resume the enclosing PROG/REPEAT just after the named label

GROW

GROW (U/VECTOR END BEG)
 #DECL ((VALUE)    <OR <PRIMTYPE VECTOR> <PRIMTYPE UVECTOR>>
        (U/VECTOR) <OR <PRIMTYPE VECTOR> <PRIMTYPE UVECTOR>> (END BEG) FIX)

increases the size of a vector or uniform vector

pymdl: SUBR in subrs/struc; the 55's argument checks apply. — add END elements at the end and BEG at the beginning of

GUNASSIGN

GUNASSIGN (ATOM)
 #DECL ((VALUE ATOM) ATOM)

causes an ATOM to have no global value

pymdl: SUBR in subrs/oblist; the 55's argument checks apply.

GVAL

GVAL (ATOM)
 #DECL ((VALUE) ANY
        (ATOM) ATOM)

returns the global value of an ATOM

pymdl: SUBR in subrs/control; the 55's argument checks apply.

HACK-NAME

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/squoze. -- the ATOM naming an applicable.

HANDLER

HANDLER (IHEADER HANDLER "OPTIONAL" (PROCESS #PROCESS 0))
 #DECL ((VALUE) HANDLER
        (IHEADER) IHEADER (HANDLER) <OR HANDLER APPLICABLE> (PROCESS) PROCESS)

creates an interrupt HANDLER

pymdl: SUBR in subrs/interrupts; the 55's argument checks apply. -> a new HANDLER at the front of the

HANG

HANG ("OPTIONAL" (UNHANG <>))
 #DECL ((VALUE) ANY
        (UNHANG) ANY)

does nothing, interruptibly, potentially forever

pymdl: SUBR in subrs/interrupts. -- hang interruptibly until pred (evaluated on each emulated

HASHER

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/storage. The compiled hash primitive (ITS "MUDDLE;HASHER NBIN", FLOADed by

IACCESS

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. — a UVECTOR pointing at word addr of the

IADR

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/ddtsubs. -> the object's absolute machine address as a FIX

IATM

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. <ATOM=? uv pname> — does this function entry's name field equal the

IBEGIN-HACK

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/system. OPHACK's bracket, under an I- name so era source can own BEGIN-HACK.

IBEGIN-MHACK

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/system. MUDHAK's bracket -- the real behavior, from its surviving interpreted

IBYTER

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. -- the 2-bit glue-bits BYTES view over a UVECTOR's

IBYTES

IBYTES (SIZE LENGTH "OPTIONAL" (ELEMENT 0))
 #DECL ((VALUE) BYTES
        (SIZE LENGTH) FIX (ELEMENT) ANY)

creates a byte-string from implicit arguments

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. <IBYTES size length [element]> — a byte-string of LENGTH SIZE-bit bytes,

ICR

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. — the open file's creation date (ITS RFDATE). The

IDBINIT

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. — get buffer pages (nlib). Nothing to map:

IDSKDATE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. / -- the current date-time as a FIX (NLUPCRF /

IEND-HACK

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/system.

IEND-MHACK

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/system. The closing MUDHAK bracket (muddle/mudhak.2): remove the '|' read-macro

IFIXMUNG

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. -- relocate a fixup UVECTOR's code

IFLUSH

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. — unmap and give back the buffer (nlib).

IFORM

IFORM (LENGTH "OPTIONAL" (ELEMENT #LOSE 0))
 #DECL ((VALUE) FORM
        (LENGTH) FIX (ELEMENT) ANY)

creates a FORM from implicit arguments

pymdl: SUBR in subrs/struc; the 55's argument checks apply. <IFORM n [init]> — an implicit FORM of n elements, analogous to ILIST

IHASH

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. — the library hash (nlib): XOR the

IHASHER

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. -> WORD: the era hashing RSUBR, reimplemented

ILIST

ILIST (LENGTH "OPTIONAL" (ELEMENT #LOSE 0))
 #DECL ((VALUE) LIST
        (LENGTH) FIX (ELEMENT) ANY)

creates a LIST from implicit arguments

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

ILOC

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. -- the object's core address as a FIX (the BTB;LOC

IMAGE

IMAGE (CODE "OPTIONAL" (CHANNEL .OUTCHAN))
 #DECL ((VALUE CODE) FIX
        (CHANNEL) CHANNEL)

sends an image-mode character via an output CHANNEL

pymdl: SUBR in subrs/builtins2. <IMAGE fix-or-char [channel]> (11.1.2.4) -- output the character

IMAKE-CODE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. -- build the final glued #CODE

IMAKST

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. — a STRING of len characters ASCII-packed five

IN

IN (POINTER)
 #DECL ((VALUE) ANY
        (POINTER) LOCATIVE)

returns the object pointed to by a locative

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

INDEX

INDEX (OFFSET)
 #DECL ((VALUE) FIX
        (OFFSET) OFFSET)

fetches the integral part of an OFFSET

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. The integral part (index) of an OFFSET (ch12).

INDICATOR

INDICATOR (ASSOCIATION)
 #DECL ((VALUE) ANY
        (ASSOCIATION) ASOC)

returns the "indicator" field of an association

pymdl: SUBR in subrs/assoc; the 55's argument checks apply.

INSERT

INSERT (PNAME OBLIST)
 #DECL ((VALUE) ATOM
        (PNAME) <OR ATOM STRING> (OBLIST) OBLIST)

adds an ATOM to an OBLIST

pymdl: SUBR in subrs/oblist; the 55's argument checks apply.

INT-LEVEL

INT-LEVEL ("OPTIONAL" NEW-INT-LEVEL)
 #DECL ((VALUE) FIX
        (NEW-INT-LEVEL) FIX)

returns and/or sets current interrupt level

pymdl: SUBR in subrs/interrupts. <INT-LEVEL [fix]> -> the previous interrupt level; sets it if given.

INTERRUPT

INTERRUPT (NAME "TUPLE" HANDLER-ARGS)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (NAME) <OR STRING ATOM IHEADER> (HANDLER-ARGS) TUPLE)

causes an interrupt to occur

pymdl: SUBR in subrs/interrupts; the 55's argument checks apply. -- fire a (usually program-defined) interrupt: run

INTERRUPTS

INTERRUPTS ()
 #DECL ((VALUE) OBLIST)

returns the OBLIST on which interrupt names are kept

pymdl: SUBR in subrs/oblist; the 55's argument checks apply. -> the OBLIST where interrupt names are kept (ch21.1).

IOPCS

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/squoze. BTB;OPHACK's backquote read-macro, a pymac peer of the compiled

IPC-HANDLER

IPC-HANDLER (BODY TYPE OTHER-NAME-1 OTHER-NAME-2
             "OPTIONAL" (MY-NAME-1 <UNAME>) (MY-NAME-2 <JNAME>))
 #DECL ((VALUE) 'T
        (BODY) <OR STRING UVECTOR> (TYPE) FIX
        (OTHER-NAME-1 OTHER-NAME-2 MY-NAME-1 MY-NAME-2) STRING)

is the built-in handler for "IPC" (ITS version only)

pymdl: SUBR in subrs/ipc. The built-in "IPC" handler (ch23.4.2): print the body, sender, and type

IPC-OFF

IPC-OFF ()
 #DECL ((VALUE) 'T)

stops all listening on the IPC device (ITS version only)

pymdl: SUBR in subrs/ipc. -- stop listening on the IPC device (ch23.4.3).

IPC-ON

IPC-ON ("OPTIONAL" (MY-NAME-1 <UNAME>) (MY-NAME-2 <JNAME>))
 #DECL ((VALUE) 'T
        (MY-NAME-1 MY-NAME-2) STRING)

listens on the IPC device (ITS version only)

pymdl: SUBR in subrs/ipc. -- listen for IPC messages as (n1, n2) (ch23.4.4).

ISBYTER

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. as SUBRFY's flavor wants it: a STRING whose k-th

ISQUOTA

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. -> the symbol's address (FIX), or FALSE when the

ISTORAGE

ISTORAGE (LENGTH "OPTIONAL" (ELEMENT #LOSE 0))
 #DECL ((VALUE) STORAGE
        (LENGTH) FIX (ELEMENT) ANY)

creates a non-garbage-collected STORAGE from implicit arguments (archaic)

pymdl: SUBR in subrs/struc; the 55's argument checks apply. <ISTORAGE n [init]> -- a STORAGE: "really a frozen UVECTOR" of its own

ISTRING

ISTRING (LENGTH "OPTIONAL" (ELEMENT !\^@))
 #DECL ((VALUE) STRING
        (LENGTH) FIX (ELEMENT) ANY)

creates a character-string from implicit arguments

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

ISUBRAD

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. -- the interpreter address of a SUBR (CLR;SUBRAD):

ISYMDDT

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/ddtsubs. -- insert each

ITEM

ITEM (ASSOCIATION)
 #DECL ((VALUE) ANY
        (ASSOCIATION) ASOC)

returns the "item" field of an association

pymdl: SUBR in subrs/assoc; the 55's argument checks apply.

ITUPLE

ITUPLE (LENGTH "OPTIONAL" (ELEMENT #LOSE 0))
 #DECL ((VALUE) TUPLE
        (LENGTH) FIX (ELEMENT) ANY)

creates a TUPLE from implicit arguments

pymdl: SUBR in subrs/struc; the 55's argument checks apply. The era's is a DUMMY sharing TUPLE's NOT-IN-ARG-LIST error

IUVECTOR

IUVECTOR (LENGTH "OPTIONAL" (ELEMENT #LOSE 0))
 #DECL ((VALUE) UVECTOR
        (LENGTH) FIX (ELEMENT) ANY)

creates a UVECTOR from implicit arguments

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

IVECTOR

IVECTOR (LENGTH "OPTIONAL" (ELEMENT #LOSE 0))
 #DECL ((VALUE) VECTOR
        (LENGTH) FIX (ELEMENT) ANY)

creates a VECTOR from implicit arguments

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

JNAME

JNAME ()
 #DECL ((VALUE) STRING)

returns the "job name" of MDL's process

pymdl: SUBR in subrs/system; the 55's argument checks apply. -> the process's job name (ch23.2); pymdl's IPC identity name2.

L=?

L=? (NUMBER-1 NUMBER-2)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (NUMBER-1 NUMBER-2) <OR FIX FLOAT>)

tells whether first argument is less than or equal to second (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

L?

L? (NUMBER-1 NUMBER-2)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (NUMBER-1 NUMBER-2) <OR FIX FLOAT>)

tells whether first argument is less than second (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

LEGAL? (STACK-OBJECT)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (STACK-OBJECT) ANY)

tells whether argument (which might live on the control stack) is still legal (predicate)

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

LENGTH

LENGTH (OBJECT)
 #DECL ((VALUE) FIX
        (OBJECT) STRUCTURED)

returns the number of elements in a structure

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

LENGTH?

LENGTH? (OBJECT MAX)
 #DECL ((VALUE) <OR FIX '#FALSE ()>
        (OBJECT) STRUCTURED (MAX) FIX)

tells whether length of structure is less than or equal to an integer (predicate)

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

LINK (EXPR PNAME "OPTIONAL" (OBLIST <1 .OBLIST>))
 #DECL ((VALUE EXPR) ANY
        (PNAME) STRING (OBLIST) OBLIST)

creates a symbolic LINK to any expression for READing

pymdl: SUBR in subrs/oblist; the 55's argument checks apply. (ch17.1.2): create a LINK with PNAME string in

LINPOS

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/channels. -- the current character position on the output line

LIST

LIST ("TUPLE" ELEMENTS)
 #DECL ((VALUE) LIST
        (ELEMENTS) TUPLE)

creates a LIST from explicit arguments

pymdl: SUBR in subrs/struc.

LISTEN

LISTEN ("TUPLE" INFO)
 #DECL ((VALUE) ANY
        (INFO) TUPLE)

stops and informs user that MDL is listening

pymdl: SUBR in subrs/errctl. <LISTEN ...> -- enter a new READ-EVAL-PRINT level (ch16.1); returns the

LLOC

LLOC (ATOM "OPTIONAL" ENV)
 #DECL ((VALUE) LOCD
        (ENV) <OR FRAME ENVIRONMENT ACTIVATION PROCESS>)

returns a locative to the local-value cell of an ATOM

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. <LLOC atom [frame]> -- locative (LOCD) to an ATOM's LVAL binding: the

LOAD

LOAD (CHANNEL "OPTIONAL" (LOOK-UP .OBLIST))
 #DECL ((VALUE) '"DONE"
        (LOOK-UP) <OR OBLIST <LIST [REST <OR OBLIST 'DEFAULT>]>>)

reads and evaluates all objects via an input CHANNEL

pymdl: SUBR in subrs/io; the 55's argument checks apply. <LOAD channel [oblist]> — READ and EVAL every object remaining on the

LOCATIVE?

LOCATIVE? (OBJECT)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT) ANY)

tells whether an object is a locative (predicate)

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

LOG

LOG (NUMBER)
 #DECL ((VALUE) FLOAT
        (NUMBER) <OR FIX FLOAT>)

returns natural logarithm of a number (arithmetic)

pymdl: SUBR in subrs/transcend; the 55's argument checks apply.

LOGOUT

LOGOUT ()
 #DECL ((VALUE) '#FALSE ())

logs out of the operating system (useful for background processes)

pymdl: SUBR in subrs/system. -- only succeeds for a top-level/disowned process; pymdl is not,

LOOKUP

LOOKUP (PNAME OBLIST)
 #DECL ((VALUE) <OR ATOM '#FALSE ()>
        (PNAME) STRING (OBLIST) OBLIST)

returns an ATOM found on a given OBLIST

pymdl: SUBR in subrs/oblist; the 55's argument checks apply. -- the lineage's ILOOK (ch15.2.1): the ITS

LPARSE

LPARSE ("OPTIONAL"
        (STRING .PARSE-STRING) (RADIX 10) (LOOK-UP .OBLIST) PARSE-TABLE LOOK-AHEAD)
 #DECL ((VALUE) LIST
        (STRING) STRING (RADIX) FIX (PARSE-TABLE) VECTOR (LOOK-AHEAD) CHARACTER
        (LOOK-UP) <OR OBLIST <LIST [REST <OR OBLIST 'DEFAULT>]>>)

returns a LIST of the objects parsed from a STRING (sections 7.6.6.3, 15.7.2, 17.1.3)

pymdl: SUBR in subrs/builtins2.

LSH

LSH (WORD AMOUNT)
 #DECL ((VALUE) WORD
        (WORD) <PRIMTYPE WORD> (AMOUNT) FIX)

shifts bits in a machine word

pymdl: SUBR in subrs/arith; the 55's argument checks apply. (ch18.6) -- the hardware takes the shift count from

LVAL

LVAL (ATOM "OPTIONAL" ENV)
 #DECL ((VALUE) ANY
        (ENV) <OR FRAME ENVIRONMENT ACTIVATION PROCESS>)

returns the local value of an ATOM

pymdl: SUBR in subrs/control; the 55's argument checks apply.

MAIN

MAIN ()
 #DECL ((VALUE) PROCESS)

returns #PROCESS 1 (the main PROCESS)

pymdl: SUBR in subrs/process; the 55's argument checks apply.

-> the initial PROCESS, #PROCESS 1 (ch20.7.2).

MANIFEST

MANIFEST ("TUPLE" ATOMS)
 #DECL ((VALUE) 'T
        (ATOMS) <TUPLE [REST ATOM]>)

declares the global values of ATOMs to be constant

pymdl: SUBR in subrs/spec_subrs. Declare globals constant; we record the set so MANIFEST? can answer.

MANIFEST?

MANIFEST? (ATOM)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (ATOM) ATOM)

tells whether the global value of an ATOM is constant (predicate)

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

MAPF

MAPF (FINAL-FCN LOOP-FCN "TUPLE" STRUCTURES)
 #DECL ((VALUE) ANY
        (FINAL-FCN) <OR APPLICABLE FALSE> (LOOP-FCN) APPLICABLE
        (STRUCTURES) <TUPLE [REST STRUCTURED]>)

maps function onto elements of structures

pymdl: SUBR in subrs/control; the 55's argument checks apply.

MAPLEAVE

MAPLEAVE ("OPTIONAL" (VAL T))
 #DECL (
        (VAL) ANY)

leaves the most recent MAPF/R with a value

pymdl: SUBR in subrs/control.

MAPR

MAPR (FINAL-FCN LOOP-FCN "TUPLE" STRUCTURES)
 #DECL ((VALUE) ANY
        (FINAL-FCN) <OR APPLICABLE FALSE> (LOOP-FCN) APPLICABLE
        (STRUCTURES) <TUPLE [REST STRUCTURED]>)

maps function onto RESTs of structures

pymdl: SUBR in subrs/control; the 55's argument checks apply.

MAPRET

MAPRET ("TUPLE" ELEMENTS)
 #DECL (
        (ELEMENTS) TUPLE)

returns a variable number of objects to the current MAPF/R

pymdl: SUBR in subrs/control.

MAPSTOP

MAPSTOP ("TUPLE" ELEMENTS)
 #DECL (
        (ELEMENTS) TUPLE)

MAPRETs, then stops looping of MAPF/R and causes application

pymdl: SUBR in subrs/control.

MAX

MAX ("TUPLE" NUMBERS)
 #DECL ((VALUE) <OR FIX FLOAT>
        (NUMBERS) <TUPLE [REST <OR FIX FLOAT>]>)

returns the greatest of its arguments (arithmetic)

pymdl: SUBR in subrs/arith.

ME

ME ()
 #DECL ((VALUE) PROCESS)

returns the current PROCESS

pymdl: SUBR in subrs/process; the 55's argument checks apply. -> the PROCESS in which it is evaluated (ch20.7.3).

MEMBER

MEMBER (OBJECT STRUCTURE)
 #DECL ((VALUE) <OR STRUCTURED '#FALSE ()>
        (OBJECT) ANY (STRUCTURE) STRUCTURED)

tells whether an object is "structurally" equal to some element of a structure (predicate)

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

MEMQ

MEMQ (OBJECT STRUCTURE)
 #DECL ((VALUE) <OR STRUCTURED '#FALSE ()>
        (OBJECT) ANY (STRUCTURE) STRUCTURED)

tells whether an object is "exactly" equal to some element of a structure (predicate)

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

MIN

MIN ("TUPLE" NUMBERS)
 #DECL ((VALUE) <OR FIX FLOAT>
        (NUMBERS) <TUPLE [REST <OR FIX FLOAT>]>)

returns the least of its arguments (arithmetic)

pymdl: SUBR in subrs/arith.

MOBLIST

MOBLIST (NAME "OPTIONAL" (LENGTH 13))
 #DECL ((VALUE) OBLIST
        (NAME) ATOM (LENGTH) FIX)

creates or gets an OBLIST

pymdl: SUBR in subrs/oblist; the 55's argument checks apply. <MOBLIST atom [fix]> -- find-or-create the OBLIST named ATOM and associate

MOD

MOD (NUMBER MODULUS)
 #DECL ((VALUE) FIX
        (NUMBER MODULUS) FIX)

returns number-theoretic remainder (fixed-point residue) (arithmetic)

pymdl: SUBR in subrs/arith; the 55's argument checks apply.

MONAD?

MONAD? (OBJECT)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT) ANY)

tells whether an object is either unstructured or an empty structure (predicate)

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. True if OBJECT is unstructured or an empty structure (ch7, appendix-2).

MSETG

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/prelude.

MUDOBJ

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/squoze. -- the SQUOZE name word of the interpreter symbol at

MUDREF-PRINTER

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/squoze. The MUDREF PRINTTYPE (UNASSM's OUTPUT-MUDREF, lost to an era FLOAD).

MUDREFIN

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/squoze. MUDHAK's '|' read-macro (muddle/mudhak.2): a SQUOZE symbol literal.

MYIOT

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. <MYIOT buf channel [count]> -- raw block word I/O (NLUPCRF's IOT):

N==?

N==? (OBJECT-1 OBJECT-2)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT-1 OBJECT-2) ANY)

tells whether two objects are NOT "exactly" equal (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

N=?

N=? (OBJECT-1 OBJECT-2)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT-1 OBJECT-2) ANY)

tells whether two objects are NOT "structurally" equal (predicate)

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

NETACC

NETACC (CHANNEL)
 #DECL ((VALUE) <OR CHANNEL '#FALSE ()>
        (CHANNEL) CHANNEL)

accepts a network connection

pymdl: SUBR in subrs/system. — accept a connection on a listening NET channel; returns

NETS

NETS (CHANNEL)
 #DECL ((VALUE CHANNEL) CHANNEL)

forces operating-system network-CHANNEL buffer to be sent

pymdl: SUBR in subrs/system. — force buffered network output out (ch11.10.3). TCP

NETSTATE

NETSTATE (CHANNEL)
 #DECL ((VALUE) <UVECTOR FIX FIX FIX>
        (CHANNEL) CHANNEL)

returns state information for a network CHANNEL

pymdl: SUBR in subrs/system. -> [state close-code bits-available] (ch11.10.1).

NEWSTRUC

Additional built-in; implementation details follow.

pymdl: FSUBR in subrs/prelude. <NEWSTRUC NAME PRIMTYPE FIELD1 DECL1 FIELD2 DECL2 ...>

NEWTYPE

NEWTYPE (NEW-TYPE OLD-TYPE "OPTIONAL" PATTERN)
 #DECL ((VALUE NEW-TYPE) ATOM
        (OLD-TYPE) ATOM (PATTERN) <OR ATOM FORM>)

defines a new data type

pymdl: SUBR in subrs/type_ops; the 55's argument checks apply.

NEXT

NEXT (ASSOCIATION)
 #DECL ((VALUE) <OR ASOC '#FALSE ()>
        (ASSOCIATION) ASOC)

returns the next object in the association chain

pymdl: SUBR in subrs/assoc; the 55's argument checks apply. The next ASOC after the given one in the chain (newest-first), or #FALSE

NEXTCHR

NEXTCHR ("OPTIONAL" (CHANNEL .INCHAN) (EOF-ROUTINE '<ERROR ...>))
 #DECL ((VALUE) <OR CHARACTER FIX>
        (CHANNEL) CHANNEL (EOF-ROUTINE) ANY)

returns the character that will next be read via an input CHANNEL

pymdl: SUBR in subrs/io. <NEXTCHR channel [eof]> — the next character WITHOUT consuming it (ch11.1.1.3).

NOPURE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/storage. -- keep pure space unmapped/writable while purification

NOT

NOT (OBJECT)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT) <OR FALSE ANY>)

computes logical "not" of a truth-value

pymdl: SUBR in subrs/pred; the 55's argument checks apply.

NTH

NTH (STRUCTURED "OPTIONAL" N)
 #DECL ((VALUE) ANY
        (N) <OR FIX OFFSET>)

fetches the Nth element of a structure

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

OBLIST?

OBLIST? (ATOM)
 #DECL ((VALUE) <OR OBLIST '#FALSE ()>
        (ATOM) ATOM)

returns an ATOM's OBLIST or false if none (predicate)

pymdl: SUBR in subrs/oblist; the 55's argument checks apply. <OBLIST? atom> -- the OBLIST containing ATOM, or #FALSE if it is on none

OFF

OFF (INTERRUPT "OPTIONAL" WHICH)
 #DECL ((VALUE) <OR HANDLER IHEADER '#FALSE ()>
        (INTERRUPT) <OR HANDLER IHEADER STRING ATOM> (WHICH) <OR CHANNEL LOCATIVE>)

removes an interrupt HANDLER or destroys an interrupt

pymdl: SUBR in subrs/interrupts; the 55's argument checks apply. removes one action; or

OFFSET

OFFSET (N PATTERN)
 #DECL ((VALUE) OFFSET
        (N) FIX (PATTERN) <OR ATOM FORM>)

creates an integer with attached type declaration

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

ON

ON (NAME APPLICABLE PRIORITY "OPTIONAL" (PROCESS 0) WHICH)
 #DECL ((VALUE) HANDLER
        (NAME) <OR STRING ATOM> (APPLICABLE) APPLICABLE (PRIORITY) FIX
        (PROCESS) <OR FIX PROCESS> (WHICH) <OR CHANNEL LOCATIVE>)

turns on an interrupt and creates an interrupt HANDLER

pymdl: SUBR in subrs/interrupts; the 55's argument checks apply. = HANDLER over EVENT (ch21.6).

OPEN

OPEN ("OPTIONAL" (MODE "READ") "TUPLE" FILE-NAME)
 #DECL ((VALUE) <OR CHANNEL <FALSE STRING STRING FIX>>
        (MODE) STRING (FILE-NAME) TUPLE)

creates and opens an I/O CHANNEL

pymdl: SUBR in subrs/channels. . Serves real files under the version's

OPEN-NR

OPEN-NR ("OPTIONAL" (MODE "READ") "TUPLE" FILE-NAME)
 #DECL ((VALUE) <OR CHANNEL <FALSE STRING STRING FIX>>
        (MODE) STRING (FILE-NAME) TUPLE)

creates and opens an I/O CHANNEL without changing file's reference date

pymdl: SUBR in subrs/channels. <OPEN-NR ...> — like OPEN but does not RESET the channel (ch11.2.2). Our

OR

OR ("ARGS" ARGS)
 #DECL ((VALUE) <OR FALSE ANY>
        (ARGS) LIST)

computes logical inclusive "or" of truth-values, evaluated by the Subroutine

pymdl: FSUBR in subrs/control.

OR?

OR? ("TUPLE" TUPLE)
 #DECL ((VALUE) <OR FALSE ANY>
        (TUPLE) TUPLE)

compares logical inclusive "or" of truth-values, evaluated at call time

pymdl: SUBR in subrs/pred.

ORB

ORB ("TUPLE" WORDS)
 #DECL ((VALUE) WORD
        (WORDS) <TUPLE [REST <PRIMTYPE WORD>]>)

computes bitwise inclusive "or" of machine words

pymdl: SUBR in subrs/arith.

OVERFLOW

OVERFLOW ("OPTIONAL" SWITCH)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (SWITCH) <OR ANY FALSE>)

enables or disables overflow error (arithmetic)

pymdl: SUBR in subrs/errctl; the 55's argument checks apply. — enable/disable arithmetic over/underflow errors;

PACKAGE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/oblist. -- begin a package: bind .OBLIST

PARSE

PARSE ("OPTIONAL"
        (STRING .PARSE-STRING) (RADIX 10) (LOOK-UP .OBLIST) PARSE-TABLE LOOK-AHEAD)
 #DECL ((VALUE) ANY
        (STRING) STRING (RADIX) FIX (PARSE-TABLE) VECTOR (LOOK-AHEAD) CHARACTER
        (LOOK-UP) <OR OBLIST <LIST [REST <OR OBLIST 'DEFAULT>]>>)

parses a STRING into an object (sections 7.6.6.2, 15.7.2, 17.1.3)

pymdl: SUBR in subrs/builtins2.

PCODE

PCODE (NAME OFFSET)
 #DECL ((VALUE) PCODE
        (NAME) STRING (OFFSET) FIX)

creates pointer to pure RSUBR code

pymdl: SUBR in subrs/rsubrs; the 55's argument checks apply. -> a pure-code pointer (TYPE PCODE, PRIMTYPE

PNAME

PNAME (ATOM)
 #DECL ((VALUE) STRING
        (ATOM) ATOM)

returns the print-name of an ATOM as a distinct copy

pymdl: SUBR in subrs/core; the 55's argument checks apply. -- a fresh copy of the ATOM's PNAME (15.7.3).

PRIMTYPE

PRIMTYPE (OBJECT)
 #DECL ((VALUE) ATOM
        (OBJECT) ANY)

returns the primitive data type of an object

pymdl: SUBR in subrs/type_ops; the 55's argument checks apply.

PRIMTYPE-C

PRIMTYPE-C (TYPE)
 #DECL ((VALUE) PRIMTYPE-C
        (TYPE) ATOM)

gets a "storage allocation code" for a data type

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. — a storage-allocation code (a PRIMTYPE-C, PRIMTYPE

PRIN1

PRIN1 (OBJECT "OPTIONAL" (CHANNEL .OUTCHAN))
 #DECL ((VALUE OBJECT) ANY
        (CHANNEL) CHANNEL)

prints an object via an output CHANNEL

pymdl: SUBR in subrs/io; the 55's argument checks apply.

PRINC

PRINC (OBJECT "OPTIONAL" (CHANNEL .OUTCHAN))
 #DECL ((VALUE OBJECT) ANY
        (CHANNEL) CHANNEL)

prints an object via an output CHANNEL without STRING or CHARACTER brackets or ATOM trailers

pymdl: SUBR in subrs/io; the 55's argument checks apply.

PRINT

PRINT (OBJECT "OPTIONAL" (CHANNEL .OUTCHAN))
 #DECL ((VALUE OBJECT) ANY
        (CHANNEL) CHANNEL)

prints an object via an output CHANNEL between new-line and space

pymdl: SUBR in subrs/io; the 55's argument checks apply.

PRINTB

PRINTB (BUFFER CHANNEL)
 #DECL ((VALUE BUFFER) <<OR UVECTOR STORAGE> [REST <PRIMTYPE WORD>]>
        (CHANNEL) CHANNEL)

writes binary information via an output CHANNEL

pymdl: SUBR in subrs/io; the 55's argument checks apply. — binary write: emit each FIX of the UVECTOR as a

PRINTSTRING

PRINTSTRING (BUFFER "OPTIONAL" (CHANNEL .OUTCHAN) (COUNT <LENGTH .BUFFER>))
 #DECL ((VALUE COUNT) FIX
        (BUFFER) STRING (CHANNEL) CHANNEL)

writes contents of a STRING via an output CHANNEL

pymdl: SUBR in subrs/io; the 55's argument checks apply. <PRINTSTRING str [channel] [count]> — write (up to count chars of) str;

PRINTTYPE

PRINTTYPE (TYPE "OPTIONAL" HOW)
 #DECL ((VALUE) <OR ATOM APPLICABLE '#FALSE ()>
        (TYPE) ATOM (HOW) <OR ATOM APPLICABLE>)

specifies or returns how a data type is printed

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. <PRINTTYPE type [how]> (ch6.4.4): declare how a TYPE PRINTs -- as

PROCESS

PROCESS (STARTUP)
 #DECL ((VALUE) PROCESS
        (STARTUP) APPLICABLE)

creates a new PROCESS with given startup function

pymdl: SUBR in subrs/process; the 55's argument checks apply. -> a new RUNABLE PROCESS (not yet run); starter is

PROG

PROG ("ARGS" ARGS)
 #DECL ((VALUE) ANY
        (ARGS) <LIST [OPT ATOM] LIST [OPT DECL] ANY>)

executes sequential expressions

pymdl: FSUBR in subrs/control.

PSETG

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/prelude.

PURE?

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/storage. <PURE? any> (env-manual 3.10.4, the UNLINK package's compiled UNPURE

PUREQ

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/storage. The compiled purity predicate (ITS "MUDDLE;PUREQ NBIN", FLOADed by the

PURIFY

PURIFY ("TUPLE" TUPLE)
 #DECL ((VALUE) ANY
        (TUPLE) TUPLE)

purifies objects for sharing by different operating-system processes

pymdl: SUBR in subrs/storage. <PURIFY any-1 ... any-N> (ch22.9.2) -- make the arguments (and their

PUT

PUT (ITEM INDICATOR "OPTIONAL" VAL)
 #DECL ((VALUE) ANY
        (ITEM) <OR STRUCTURED ANY> (INDICATOR) <OR FIX OFFSET ANY> (VAL) ANY)

stores into structure or does PUTPROP

pymdl: SUBR in subrs/struc; the 55's argument checks apply. : index-sets if item is structured and

PUT-DECL

PUT-DECL (IDENTIFIER PATTERN)
 #DECL ((VALUE IDENTIFIER) <OR LOCD OFFSET>
        (PATTERN) <OR ATOM FORM>)

changes the type declaration for an ATOM's value or an OFFSET

pymdl: SUBR in subrs/oblist; the 55's argument checks apply. — set the DECL of an OFFSET, an ATOM's

PUTBITS

PUTBITS (TO FIELD "OPTIONAL" (FROM 0))
 #DECL ((VALUE) <PRIMTYPE WORD>
        (TO FROM) <PRIMTYPE WORD> (FIELD) BITS)

sets a bit field in a machine word

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply.

PUTPROP

PUTPROP (ITEM INDICATOR "OPTIONAL" VAL)
 #DECL ((VALUE) ANY
        (ITEM INDICATOR VAL) ANY)

(dis)associates a value with an item under an indicator

pymdl: SUBR in subrs/assoc; the 55's argument checks apply.

PUTREST

PUTREST (HEAD TAIL)
 #DECL ((VALUE HEAD) <PRIMTYPE LIST>
        (TAIL) <PRIMTYPE LIST>)

replaces the rest of a list

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

PYCODE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/embed. -- EVAL a Python expression that yields a callable

PYCOMPILE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/embed. -- compile to PYTHON (pymdl/pycomp.py).

PYCOMPILE-RECORD

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/embed. <PYCOMPILE-RECORD [flush?]> -- what the native compiler has done here.

PYCOMPILE-SOURCE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/embed. -- the Python a compile WOULD emit,

PYDEFINE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/embed. <PYDEFINE name (params) body-string> -- like DEFINE, but BODY is Python.

QUIT

QUIT ()
 #DECL ((VALUE) '#FALSE ())

exits from MDL gracefully

pymdl: SUBR in subrs/system.

QUITTER

QUITTER (WAS-TYPED CHANNEL)
 #DECL ((VALUE WAS-TYPED) CHARACTER
        (CHANNEL) CHANNEL)

is the interrupt handler for ^G and ^S quit features

pymdl: SUBR in subrs/interrupts. The built-in "CHAR" handler for ^S/^O/^G on ,INCHAN (ch21.8.1 / ch1.2).

QUOTE

QUOTE ("ARGS" ARGS)
 #DECL ((VALUE) ANY
        (ARGS) LIST)

returns the first argument unevaluated

pymdl: FSUBR in subrs/control.

RANDOM

RANDOM ("OPTIONAL" SEED-1 SEED-2)
 #DECL ((VALUE) FIX
        (SEED-1 SEED-2) FIX)

generates a uniform pseudo-random integer (arithmetic)

pymdl: SUBR in subrs/system; the 55's argument checks apply. <RANDOM [seed1 [seed2]]> -> a FIX uniformly over the whole (signed) FIX range

READ

READ ("OPTIONAL"
        (CHANNEL .INCHAN) (EOF-ROUTINE '<ERROR ...>) (LOOK-UP .OBLIST) READ-TABLE)
 #DECL ((VALUE) ANY
        (CHANNEL) CHANNEL (EOF-ROUTINE) ANY (READ-TABLE) VECTOR
        (LOOK-UP) <OR OBLIST <LIST [REST <OR OBLIST 'DEFAULT>]>>)

reads one object via an input CHANNEL (sections 11.1.1.1, 11.3, 15.7.1, 17.1.3)

pymdl: SUBR in subrs/io. <READ [channel] [eof-routine] ...> — read one MDL object (ch11). From an

READB

READB (BUFFER CHANNEL "OPTIONAL" (EOF-ROUTINE '<ERROR ...>))
 #DECL ((VALUE) FIX
        (BUFFER) <<OR UVECTOR STORAGE> [REST <PRIMTYPE WORD>]>
        (CHANNEL) CHANNEL (EOF-ROUTINE) ANY)

reads binary information via an input CHANNEL

pymdl: SUBR in subrs/io; the 55's argument checks apply. <READB buffer channel [eof]> — binary read: fill the UVECTOR with

READCHR

READCHR ("OPTIONAL" (CHANNEL .INCHAN) (EOF-ROUTINE '<ERROR ...>))
 #DECL ((VALUE) <OR CHARACTER FIX>
        (CHANNEL) CHANNEL (EOF-ROUTINE) ANY)

reads one character via an input CHANNEL

pymdl: SUBR in subrs/io. <READCHR channel [eof]> — read and consume the next character (ch11.1.1.2).

READSTRING

READSTRING (BUFFER "OPTIONAL" (CHANNEL .INCHAN) (STOP <LENGTH .BUFFER>)
                              (EOF-ROUTINE '<ERROR ...>))
 #DECL ((VALUE) FIX
        (BUFFER) STRING (CHANNEL) CHANNEL (STOP) <OR FIX STRING> (EOF-ROUTINE) ANY)

reads into a STRING via an input CHANNEL

pymdl: SUBR in subrs/io; the 55's argument checks apply. <READSTRING buffer channel breakchars [eof-routine]> — read into the STRING

REALTIMER

REALTIMER ("OPTIONAL" INTERVAL)
 #DECL ((VALUE) <OR FIX FLOAT '#FALSE ()>
        (INTERVAL) <OR FIX FLOAT>)

sets or fetches interval for real-time interrupts (ITS version only)

pymdl: SUBR in subrs/interrupts; the 55's argument checks apply. -- after this, "REALT" occurs every N real seconds; <REALTIMER

REMOVE

REMOVE (PNAME "OPTIONAL" OBLIST)
 #DECL ((VALUE) <OR ATOM '#FALSE ()>
        (PNAME) <OR ATOM STRING> (OBLIST) OBLIST)

removes an ATOM from an OBLIST

pymdl: SUBR in subrs/oblist; the 55's argument checks apply. <REMOVE pname [oblist]> — remove an ATOM from an OBLIST (ch15.7.5).

RENAME

RENAME ("TUPLE" FILE-NAME/S)
 #DECL ((VALUE) <OR 'T <FALSE STRING FIX>>
        (FILE-NAME/S) <TUPLE <OR STRING CHANNEL>>)

renames or deletes a disk file

pymdl: SUBR in subrs/channels. renames; deletes; <RENAME channel

RENTRY

Additional built-in; implementation details follow.

pymdl: FSUBR in subrs/oblist. -- declare ATOMs as the package's external entries: move

REP

REP ()
 #DECL ((VALUE) ANY)

is the built-in function for READ-EVAL-PRINT loop

pymdl: SUBR in subrs/errctl. -- the READ-EVAL-PRINT loop of the current LISTEN level (16.1).

REPEAT

REPEAT ("ARGS" ARGS)
 #DECL ((VALUE) ANY
        (ARGS) <LIST [OPT ATOM] LIST [OPT DECL] ANY>)

executes sequential expressions repeatedly

pymdl: FSUBR in subrs/control.

REPURE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/storage. -- write modified pure pages back (the PURITY companion of

RESET

RESET (CHANNEL)
 #DECL ((VALUE) <OR CHANNEL <FALSE STRING STRING FIX>>
        (CHANNEL) CHANNEL)

reopens an I/O CHANNEL at its beginning

pymdl: SUBR in subrs/channels; the 55's argument checks apply. — "like OPENing it afresh, with only the file-name slots

REST

REST (STRUCTURED "OPTIONAL" (N 1))
 #DECL ((VALUE) STRUCTURED
        (N) FIX)

removes the first N elements from a structure and changes to primitive data type

pymdl: SUBR in subrs/struc; the 55's argument checks apply.

RESTORE

RESTORE ("OPTIONAL" NAME-1 NAME-2 NAME-3 NAME-4)
 #DECL ((VALUE) '"RESTORED"
        (NAME-1 NAME-2 NAME-3 NAME-4) STRING)

restores MDL's state from a file

pymdl: SUBR in subrs/builtins2. <RESTORE [filespec]> -- replace the entire current state with the SAVEd

RESUME

RESUME (VAL "OPTIONAL" (PROCESS <RESUMER>))
 #DECL ((VALUE) ANY
        (VAL) ANY (PROCESS) PROCESS)

transfers execution to another PROCESS

pymdl: SUBR in subrs/process. <RESUME retval [process]> -- start/continue process, handing it retval;

RESUMER

RESUMER ("OPTIONAL" (PROCESS <ME>))
 #DECL ((VALUE) <OR PROCESS '#FALSE ()>
        (PROCESS) PROCESS)

returns the PROCESS that last resumed the given PROCESS

pymdl: SUBR in subrs/process. <RESUMER [process]> -> the PROCESS that last RESUMEd it ( by default),

RETRY

RETRY ("OPTIONAL" FRAME)
 #DECL (
        (FRAME) FRAME)

retries a previous Subroutine call, usually from the error level

pymdl: SUBR in subrs/errctl. <RETRY [frame]> -- strip the stack to frame (default: the innermost

RETURN

RETURN ("OPTIONAL" (VAL T) (ACTIVATION .LPROG\ !-INTERRUPTS))
 #DECL ((VALUE) ANY
        (VAL) ANY (ACTIVATION) ACTIVATION)

leaves a PROG/REPEAT with a value

pymdl: SUBR in subrs/control.

RGLOC

RGLOC (ATOM "OPTIONAL" (MAKE-SLOT <>))
 #DECL ((VALUE) LOCR
        (ATOM) ATOM (MAKE-SLOT) <OR FALSE ANY>)

returns a locative to the global-value cell of an ATOM for pure-program use

pymdl: SUBR in subrs/rsubrs; the 55's argument checks apply. <RGLOC atom [make?]> -- "relative GLOC", used by purified RSUBRs (ch19.4).

RGLOC-CHTYPE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/squoze. -- the LOCR reinterpreted as its machine WORD

ROOT

ROOT ()
 #DECL ((VALUE) OBLIST)

returns the OBLIST containing names of primitives

pymdl: SUBR in subrs/oblist; the 55's argument checks apply.

ROT

ROT (WORD AMOUNT)
 #DECL ((VALUE) WORD
        (WORD) <PRIMTYPE WORD> (AMOUNT) FIX)

rotates bits in a machine word

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply. (ch18.6): rotate the 36 bits of FROM left by AMOUNT

RSUBR

RSUBR (CANDIDATE)
 #DECL ((VALUE) RSUBR
        (CANDIDATE) <VECTOR <OR CODE PCODE> ATOM DECL [REST ANY]>)

creates an RSUBR

pymdl: SUBR in subrs/rsubrs; the 55's argument checks apply. <RSUBR [code name decl ref...]> -> the VECTOR CHTYPEd to RSUBR (ch19.6).

RSUBR-ENTRY

RSUBR-ENTRY (CANDIDATE OFFSET)
 #DECL ((VALUE) RSUBR-ENTRY
        (CANDIDATE) <VECTOR <OR ATOM RSUBR> ATOM DECL> (OFFSET) FIX)

adds an entry point to an RSUBR

pymdl: SUBR in subrs/rsubrs; the 55's argument checks apply. <RSUBR-ENTRY [rsubr-or-atom name decl] offset> -> an RSUBR-ENTRY (ch19.7).

RSUBR-LINK ("OPTIONAL" SWITCH)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (SWITCH) <OR FALSE ANY>)

enables or disables the automatic RSUBR linking feature

pymdl: SUBR in subrs/rsubrs; the 55's argument checks apply.

RUNINT

RUNINT ("TUPLE" TUPLE)
 #DECL ((VALUE) ANY
        (TUPLE) TUPLE)

applies interrupt handler (for internal use only)

pymdl: SUBR in subrs/interrupts. -- apply an interrupt handler to its arguments

RUNTIMER

RUNTIMER ("OPTIONAL" INTERVAL)
 #DECL ((VALUE) <OR FIX FLOAT '#FALSE ()>
        (INTERVAL) <OR FIX FLOAT>)

sets or fetches interval for run-time interrupt (ITS version only)

pymdl: SUBR in subrs/interrupts; the 55's argument checks apply. -- "RUNT" occurs once, N seconds of run time later;

SAV-BLOCK

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. -- a pure-code block from an era SAV file

SAVE

SAVE ("TUPLE" FILE-NAME-AND-GC?)
 #DECL ((VALUE) '"SAVED"
        (FILE-NAME-AND-GC?) <TUPLE [OPT STRING] [OPT STRING]
                                   [OPT STRING] [OPT STRING] [OPT <OR FALSE ANY>]>)

writes the entire state of MDL to a file

pymdl: SUBR in subrs/builtins2. <SAVE [filespec] [gc?]> -> snapshot the whole state; return "SAVED".

SEND

SEND (OTHER-NAME-1 OTHER-NAME-2 BODY
      "OPTIONAL" (TYPE 0) (MY-NAME-1 <UNAME>) (MY-NAME-2 <JNAME>))
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OTHER-NAME-1 OTHER-NAME-2 MY-NAME-1 MY-NAME-2) STRING (TYPE) FIX
        (BODY) <OR STRING STORAGE <UVECTOR [REST <PRIMTYPE WORD>]>>)

sends an IPC message (ITS version only)

pymdl: SUBR in subrs/ipc. -- send an IPC message; T if delivered,

SEND-WAIT

SEND-WAIT (OTHER-NAME-1 OTHER-NAME-2 BODY
           "OPTIONAL" (TYPE 0) (MY-NAME-1 <UNAME>) (MY-NAME-2 <JNAME>))
 #DECL ((VALUE) 'T
        (OTHER-NAME-1 OTHER-NAME-2 MY-NAME-1 MY-NAME-2) STRING (TYPE) FIX
        (BODY) <OR STRING STORAGE <UVECTOR [REST <PRIMTYPE WORD>]>>)

sends an IPC message and waits for it to be received (ITS version only)

pymdl: SUBR in subrs/ipc. -- like SEND, but block

SET

SET (ATOM LVAL "OPTIONAL" ENV)
 #DECL ((VALUE LVAL) ANY
        (ATOM) ATOM (ENV) <OR FRAME ENVIRONMENT ACTIVATION PROCESS>)

changes the local value of an ATOM

pymdl: SUBR in subrs/control; the 55's argument checks apply.

SET-PUR

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/storage. -- restore pure-page mapping mode (NOPURE's inverse);

SETG

SETG (ATOM GVAL)
 #DECL ((VALUE GVAL) ANY
        (ATOM) ATOM)

changes (the global value of an ATOM

pymdl: SUBR in subrs/control; the 55's argument checks apply.

SETLOC

SETLOC (POINTER OBJECT)
 #DECL ((VALUE OBJECT) ANY
        (POINTER) LOCATIVE)

changes the contents pointed to by a locative

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

SIN

SIN (NUMBER)
 #DECL ((VALUE) FLOAT
        (NUMBER) <OR FIX FLOAT>)

returns sine of a number (arithmetic)

pymdl: SUBR in subrs/transcend; the 55's argument checks apply.

SLEEP

SLEEP (<OR FIX FLOAT> "OPTIONAL" (UNHANG <>))
 #DECL ((VALUE) ANY
        (UNHANG) ANY)

does nothing, interruptibly, the given number of seconds

pymdl: SUBR in subrs/interrupts. -- suspend for time seconds, then return T (ch21.10.2);

SNAME

SNAME ("OPTIONAL" DIRECTORY)
 #DECL ((VALUE DIRECTORY) STRING)

sets or returns the directory name used by default for new I/O CHANNELs

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. <SNAME [string]> -- the default file directory (11.1.1): with an

SORT

SORT (PRED KEY-STRUC "OPTIONAL" (RECORD-LENGTH 1) (KEY-OFFSET 0)
                     "TUPLE" OTHER-STRUCS-AND-RECORD-LENGTHS)
 #DECL ((VALUE KEY-STRUC) <OR <PRIMTYPE VECTOR> <PRIMTYPE TUPLE> <PRIMTYPE UVECTOR>>
        (PRED) <OR FALSE APPLICABLE> (RECORD-LENGTH KEY-OFFSET) FIX
        (OTHER-STRUCS-AND-RECORD-LENGTHS)
        <TUPLE [REST <OR <PRIMTYPE VECTOR> <PRIMTYPE TUPLE> <PRIMTYPE UVECTOR>> FIX]>)

sorts elements of a structure and rearranges other structures

pymdl: SUBR in subrs/spec_subrs. <SORT PRED KEY-STRUC [REC-LEN [KEY-OFFSET [OTHER-STRUC OTHER-LEN ...]]]>

SORTX

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/spec_subrs. <SORT PRED KEY-STRUC [REC-LEN [KEY-OFFSET [OTHER-STRUC OTHER-LEN ...]]]>

SPECIAL

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/builtins2.

SPECIAL-CHECK

SPECIAL-CHECK ("OPTIONAL" SWITCH)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (SWITCH) <OR ANY FALSE>)

turns interpreter special-checking on or off

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. — turn run-time SPECIAL checking on/off

SPECIAL-MODE

SPECIAL-MODE ("OPTIONAL" SWITCH)
 #DECL ((VALUE) <OR 'SPECIAL 'UNSPECIAL>
        (SWITCH) <OR 'SPECIAL 'UNSPECIAL>)

sets specialty declaration used by default

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. — set the default specialty for undeclared

SPNAME

SPNAME (ATOM)
 #DECL ((VALUE) STRING
        (ATOM) ATOM)

returns the print-name of an ATOM by sharing it

pymdl: SUBR in subrs/core; the 55's argument checks apply. -- the ATOM's PNAME as a STRING that shares its

SQRT

SQRT (NUMBER)
 #DECL ((VALUE) FLOAT
        (NUMBER) <OR FIX FLOAT>)

returns square root of a number (arithmetic)

pymdl: SUBR in subrs/transcend; the 55's argument checks apply.

SQUOTA

SQUOTA (SYMBOL)
 #DECL ((VALUE) <OR FIX '#FALSE ()>
        (SYMBOL) <PRIMTYPE WORD>)

gets the address of an internal interpreter symbol (for internal use only)

pymdl: SUBR in subrs/squoze; the 55's argument checks apply. -- the address of the interpreter-internal symbol with

SQUOZE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/squoze. <SQUOZE string [flags [only-good?]]> -- the DDT "squoze" (radix-40)

STACKFORM

STACKFORM ("ARGS" ARGS)
 #DECL ((VALUE) ANY
        (ARGS) LIST)

applies a function to stacked arguments (archaic)

pymdl: FSUBR in subrs/control. (archaic, ch10.3.5) -- equivalent to

STATE

STATE (PROCESS)
 #DECL ((VALUE) ATOM
        (PROCESS) PROCESS)

returns a PROCESS's current state

pymdl: SUBR in subrs/process; the 55's argument checks apply. -> RUNABLE / RUNNING / RESUMABLE / DEAD (an ATOM, ch20.2).

STR-BLT

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. -- pack the STRING's

STRCOMP

STRCOMP (STRING-1 STRING-2)
 #DECL ((VALUE) <OR '1 '0 '-1>
        (STRING-1 STRING-2) <OR ATOM STRING>)

compares two character-strings or two print-names

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

STRING

STRING ("TUPLE" ELEMENTS)
 #DECL ((VALUE) STRING
        (ELEMENTS) <TUPLE [REST <OR STRING CHARACTER>]>)

creates a character-string from explicit arguments

pymdl: SUBR in subrs/struc.

STRUCTURED?

STRUCTURED? (OBJECT)
 #DECL ((VALUE) <OR 'T '#FALSE ()>
        (OBJECT) ANY)

tells whether an object is structured (predicate)

pymdl: SUBR in subrs/spec_subrs; the 55's argument checks apply.

SUBR-LABEL

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/squoze. -- the era symbol that names it.

SUBSTITUTE

SUBSTITUTE (NEW OLD)
 #DECL ((VALUE OLD) ANY
        (NEW) ANY)

substitutes one object for another in the entire address space

pymdl: SUBR in subrs/builtins2; the 55's argument checks apply. -> old (ch22.9.1), after a miniature garbage

SUBSTRUC

SUBSTRUC (FROM "OPTIONAL" (REST 0) (AMOUNT <- <LENGTH .OBJECT> .REST>) TO)
 #DECL ((VALUE TO) <OR LIST VECTOR UVECTOR STRING BYTES>
        (FROM) <OR <PRIMTYPE LIST> <PRIMTYPE VECTOR> <PRIMTYPE TUPLE>
                   <PRIMTYPE UVECTOR> <PRIMTYPE STRING> <PRIMTYPE BYTES>>
        (REST AMOUNT) FIX)

copies (part of) a structure into another

pymdl: SUBR in subrs/struc; the 55's argument checks apply. <SUBSTRUC src [rest [amount [dest]]]> — copy a slice of src.

SUBUV

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. -- a fresh UVECTOR of the first len elements

SUICIDE

SUICIDE (VAL "OPTIONAL" (PROCESS <RESUMER>))
 #DECL ((VALUE) ANY
        (VAL) ANY (PROCESS) PROCESS)

causes the current PROCESS to die and resumes another

pymdl: SUBR in subrs/process. <SUICIDE retval [process]> -- like RESUME, but mark the current PROCESS

TAG

TAG (LABEL)
 #DECL ((VALUE) TAG
        (LABEL) ATOM)

creates a TAG for use by GO

pymdl: SUBR in subrs/control; the 55's argument checks apply. — a TAG for that label in the immediately surrounding PROG/

TDSKDATE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/nlibdb. / -- the current date-time as a FIX (NLUPCRF /

TEMPLATE

Additional built-in; implementation details follow.

pymdl: SUBR in subrs/template.