Annotation of 43BSD/contrib/apl/doc/syscom, revision 1.1.1.1

1.1       root        1: .LP
                      2: The following is a complete list
                      3: of \*a system commands.
                      4: .IP ")clear" 14
                      5: This command is used to completely
                      6: initialize an \*a
                      7: workspace.
                      8: Usually when \*a is
                      9: started,
                     10: it will print:
                     11: ``clear ws''.
                     12: This means that
                     13: no internal variables
                     14: or functions are defined.
                     15: Sometimes,
                     16: it is desirable to completely
                     17: erase everything,
                     18: and this command serves that purpose.
                     19: To let you know that everything
                     20: has been erased,
                     21: \*a will output the message
                     22: ``clear ws''.
                     23: .IP ")code fn" 14
                     24: This command causes \*a to print the
                     25: compiled internal code for the function
                     26: ``fn''.
                     27: This is intended for \*a system development
                     28: and not for general use.
                     29: .IP ")continue" 14
                     30: ``)continue'' is a combination
                     31: of the ``)save'' and ``)off'' commands
                     32: (see below).
                     33: The internal workspace is saved in
                     34: a file named ``continue'',
                     35: and then \*a is terminated.
                     36: Since \*a will by default look
                     37: for the file ``continue'' in the current
                     38: directory when it is next run,
                     39: this provides a convenient method
                     40: of suspending and resuming an \*a session.
                     41: .IP ")copy xxx" 14
                     42: This command instructs \*a
                     43: to locate the \*u file ``xxx''
                     44: and load it into its internal
                     45: workspace, similar to the
                     46: ``)load'' command
                     47: (see below).
                     48: The difference between
                     49: ``)load'' and ``)copy''
                     50: is that ``)load'' will replace
                     51: the current internal workspace
                     52: with the one being read in,
                     53: while ``)copy'' merges the
                     54: current internal workspace with
                     55: the one being read in.
                     56: Functions and variables which
                     57: are loaded from the file
                     58: take precedence over functions
                     59: and variables of the same name
                     60: existing already in the internal
                     61: workspace.
                     62: .IP ")digits n" 14
                     63: This command is used to specify
                     64: to \*a how many digits
                     65: are to be displayed when
                     66: a number is printed in
                     67: floating-point
                     68: or exponential format.
                     69: By default,
                     70: \*a will print 9 digits.
                     71: You may specify any number
                     72: between 1 and 19 for the
                     73: number of digits (n).
                     74: \*a will respond with
                     75: the number of digits it
                     76: was using.
                     77: .IP ")debug" 14
                     78: This command invokes ``debug mode.''
                     79: In this mode,
                     80: every action which \*a takes is logged on
                     81: the terminal.
                     82: This mode is excellent for generating
                     83: reams of hopelessly cryptic output and
                     84: exists only to facilitate \*a development.
                     85: It is not intended for general use.
                     86: Debug mode can be turned off by issuing
                     87: the ``)debug'' system command a second time.
                     88: .IP ")drop list" 14
                     89: This command performs the same
                     90: function as ``rm'' in \*u.
                     91: The names of the files to be
                     92: deleted should be separated by
                     93: spaces or tabs.
                     94: The files may be
                     95: \*a workspaces,
                     96: ASCII files,
                     97: or any other type of \*u file.
                     98: .IP ")editf xxx" 14
                     99: This command is used to
                    100: create and edit functions.
                    101: If the function named ``xxx''
                    102: exists in the workspace,
                    103: \*a will write it into a
                    104: temporary \*u file
                    105: and then will execute the
                    106: \*u editor
                    107: on that file.
                    108: When you have finished
                    109: editing the file,
                    110: and you exit the editor,
                    111: \*a will come back
                    112: and will read the function
                    113: from the temporary file.
                    114: .IP ")edit xxx" 14
                    115: This command is similar to
                    116: ``)editf'' except that ``xxx''
                    117: is a \*u filename.
                    118: \*a will execute the editor
                    119: to edit the \*u file named
                    120: ``xxx'',
                    121: and when the editing is complete,
                    122: \*a will read that file into the workspace.
                    123: The difference between ``)edit'' and ``)editf''
                    124: is that ``)editf'' essentially edits
                    125: functions directly from the workspace,
                    126: while ``)edit'' gets the functions from
                    127: the \*u directory.
                    128: .IP ")erase list" 14
                    129: This command is handy when it
                    130: is desirable to get rid of parts
                    131: of a workspace without using
                    132: ``)clear'' to eliminate all of it.
                    133: A list of function and variable
                    134: names
                    135: (separated by spaces or tabs)
                    136: may be specified.
                    137: The named functions and variables
                    138: will be deleted from the internal
                    139: workspace.
                    140: The remainder of the workspace will
                    141: not be affected.
                    142: .IP ")fns" 14
                    143: This command causes \*a
                    144: to list the names of all
                    145: of the functions which are
                    146: defined in its internal workspace.
                    147: .IP ")lib" 14
                    148: This command is similar to the
                    149: ``ls'' command in \*u.
                    150: It causes \*a to list the names
                    151: of all of the \*u files in
                    152: the current directory.
                    153: .IP ")list xxx" 14
                    154: This command causes \*a to print out
                    155: the function named ``xxxx''.
                    156: This is very handy for looking
                    157: at a function without having to
                    158: use the editor \(em
                    159: especially when an error has
                    160: occurred and you wish to look at
                    161: a function without disturbing the
                    162: state indicator.
                    163: .IP ")load xxx" 14
                    164: This command is used to instruct
                    165: \*a to load the \*u file
                    166: ``xxx'' as a workspace.
                    167: After the file is loaded,
                    168: \*a's internal workspace will
                    169: be the same as it was when the
                    170: workspace file was saved with ``)save'',
                    171: and that previous \*a session may be resumed.
                    172: If the workspace file
                    173: exists and is successfully
                    174: loaded,
                    175: \*a will print the time
                    176: and date that the workspace
                    177: was last saved.
                    178: .IP ")off" 14
                    179: This command 
                    180: terminates the \*a session.
                    181: The \*u command program
                    182: will come back and print its
                    183: prompt
                    184: (``$ '' or ``% '').
                    185: .IP ")origin n" 14
                    186: This command is used to change
                    187: the ``origin''.
                    188: By default, the origin is 1.
                    189: The ``origin'' is the
                    190: starting index for arrays.
                    191: For example,
                    192: if the origin is 0,
                    193: then the first element of
                    194: a 3-element array A is
                    195: A[0].
                    196: If the origin is 5,
                    197: the first element will be
                    198: A[5].
                    199: Although standard \*a permits
                    200: only 0 or 1 for the origin,
                    201: \*u \*a allows any
                    202: integer value.
                    203: \*a will answer with
                    204: the origin it was using.
                    205: .IP ")prws" 14
                    206: This command causes \*a
                    207: to print the contents of the workspace
                    208: in a readable format.
                    209: Non-scalar variables are displayed along
                    210: with their dimensions;
                    211: functions are displayed as via the ``)list''
                    212: system command.
                    213: .IP ")read xxx" 14
                    214: At times it is desirable
                    215: to read a function which
                    216: is stored in an ASCII file
                    217: into the internal workspace.
                    218: The ``)read'' command causes
                    219: \*a to read the \*u file
                    220: named ``xxx'' into the workspace
                    221: as a function.
                    222: Note that ``)read'' and ``)load''
                    223: (see above)
                    224: are
                    225: .I not
                    226: the same thing.
                    227: ``)load'' reads a complete new workspace
                    228: into \*a from a workspace-format file,
                    229: while ``)read'' reads a function
                    230: from an ASCII file
                    231: and adds it to the current workspace.
                    232: .IP ")reset" 14
                    233: This command is used to reset the
                    234: state indicator.
                    235: All suspended functions are reset;
                    236: the state indicator will be cleared.
                    237: APL returns to the global level.
                    238: .IP ")save xxx" 14
                    239: This command causes \*a to write
                    240: its internal workspace into a
                    241: \*u file.
                    242: This allows the current session
                    243: to be resumed at a later time.
                    244: If the save is successful,
                    245: \*a will output the date and time.
                    246: .IP ")script xxx" 14
                    247: This command places \*a
                    248: into a ``protocol'' mode.
                    249: Following this command,
                    250: \*a will copy all input
                    251: from the terminal and
                    252: output to the terminal
                    253: to the file ``xxx''.
                    254: Thus,
                    255: ``xxx'' is a complete
                    256: transcript of the \*a session.
                    257: To turn off the script file,
                    258: type ``)script off''.
                    259: The protocol file which is
                    260: produced will contain all of
                    261: the output produced by \*a itself,
                    262: but will,
                    263: unfortunately,
                    264: not contain any output
                    265: produced by another
                    266: process
                    267: (such as the editor).
                    268: .IP ")shell" 14
                    269: This command is useful when it is desired
                    270: to return to \*u temporarily without
                    271: having to save the current internal workspace,
                    272: exit \*a,
                    273: and later re-enter \*a and reload the workspace.
                    274: ``)shell'' causes \*a to execute
                    275: the \*u ``shell'' program
                    276: (command interpreter).
                    277: When you have finished with the
                    278: shell,
                    279: logout and you will be returned to \*a.
                    280: .IP ")si" 14
                    281: This command is useful when something
                    282: goes wrong.
                    283: When an error occurs,
                    284: the function that was executing is
                    285: ``suspended''.
                    286: The ``)si'' command causes \*a to
                    287: print a traceback of the
                    288: suspended functions.
                    289: Each function is listed,
                    290: in the reverse order that it was called.
                    291: The current line number for each function
                    292: is also printed.
                    293: Functions followed by an asterisk (``*'')
                    294: were suspended due to an error;
                    295: these were called by functions listed
                    296: on the following lines whose names
                    297: are not followed by an asterisk.
                    298: .IP ")trace" 14
                    299: This command
                    300: turns on \*a's internal ``trace'' mode.
                    301: When tracing is turned on,
                    302: \*a will report the function name
                    303: and line number of each
                    304: line in every function executed.
                    305: Thus,
                    306: the flow of execution from the
                    307: start to the end of a run can be
                    308: followed.
                    309: .IP ")untrace" 14
                    310: This command turns off ``trace'' mode.
                    311: .IP ")vars" 14
                    312: This command causes \*a
                    313: to list the names of all
                    314: of the variables which are
                    315: defined in its internal workspace.
                    316: .IP ")vsave xxx" 14
                    317: This command allows parts of
                    318: a workspace to be saved.
                    319: The functions and variables
                    320: which are specified will be
                    321: saved in a \*u file in the same
                    322: format as produced by ``)save''
                    323: (see above).
                    324: \*a will prompt for the
                    325: names of the functions and variables
                    326: to be saved.
                    327: When you have entered the
                    328: last name,
                    329: type a blank line to end the save
                    330: operation.
                    331: The workspace you have created
                    332: with ``)vsave'' may be loaded with
                    333: ``)load'' at some later time.
                    334: ``)vsave'' does not affect
                    335: variables in the internal workspace.
                    336: .IP ")width n" 14
                    337: This command tells \*a to print
                    338: n characters per line.
                    339: This is useful to keep output from
                    340: being printed outside of the physical
                    341: terminal width.
                    342: Lines longer than this length will be
                    343: ``wrapped-around''.
                    344: \*a will respond with
                    345: the previous terminal width.
                    346: .IP ")write xxx" 14
                    347: This command is the complement of
                    348: ``)read'' (see above).
                    349: It takes the function ``xxx''
                    350: from the current workspace and
                    351: writes it to an ASCII file named ``xxx''.
                    352: This is useful for writing functions
                    353: which will be ``)read'' later into other
                    354: workspaces.
                    355: Note that ``)write'' and ``)vsave'' are not the
                    356: same thing,
                    357: for ``)write'' is used to write a
                    358: function into an ASCII file
                    359: while ``)vsave'' saves a selected subset
                    360: of the internal workspace in a
                    361: workspace-format file.
                    362: .LP

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.