HELP COMMANDS Simon Nichols, September 1987 Revised R. Duncan, March 1990 Top-level commands in PML. CONTENTS - (Use g to access required sections) 1 Introduction 2 Available Commands 3 Invoking Commands From Ved ----------------------------------------------------------------------- 1 Introduction ----------------------------------------------------------------------- In addition to evaluating declarations and expressions in the Standard ML language, the top level of the PML system accepts a range of commands which give access to features of the Poplog environment. Commands are valid only at the very top level of PML, wherever a topdec would be valid in the standard language. The syntax of commands is as follows: command ::= name arg-1 __ arg-n << ";" >> (n >= 0) A command name is a standard short identifier. Command names are not reserved: they may be reused freely as normal identifiers. The only possibility of confusion arises where such an identifier is used as the name of a variable, constructor or exception occurring as the first item in a top-level expression. In this case the identifier should be enclosed in parentheses to prevent its interpretation as a command name. A command argument may be a standard string constant or, if not quoted, any arbitrary sequence of printing characters excluding the separators: space, tab, newline, semicolon (;) and string quote ("). An unquoted argument need not conform to the standard lexical rules. A command is terminated by the end of line or by a semicolon, whichever comes first; a command may not extend over more than one line. Examples of valid commands: cd cd ../example cd "../example"; ----------------------------------------------------------------------- 2 Available Commands ----------------------------------------------------------------------- The following commands are recognised by PML. Command names are shown in bold type, and arguments in italic. For most commands, the arguments are optional. bye Exits from PML. This is equivalent to calling the function System.exit. See HELP * exit. cd directory-name Changes the current working (default) directory to that given, or to the home (login) directory if the argument is omitted. See pwd below. help topic Displays documentation on the given topic. The topic may be any of those listed in the file HELP * HELPFILES or else the name of a PML system or library identifier. If no topic is given, an introductory help file is displayed. im filename Invokes the editor in ``immediate mode'' on the named file; if no filename is specified, the last immediate-mode filename is used. Immediate mode is a way of interacting with the PML system inside an editor buffer. See HELP * IM, * MLVED load filename Compiles the named file as an SML program; if no filename is given, the most-recently referenced filename is used. See HELP * COMPILE for full details. pop11 Switches from ML to the language Pop-11. To return to ML, use the Pop-11 macro pml. pwd Prints the current working (default) directory. All filenames, if not given as absolute pathnames, are interpreted relative to this. showdef identifier ... Displays information about identifiers defined in the current environment. See HELP * SHOWDEF for details. showlib filename Displays the program file which would be compiled if the given filename were used as an argument to load. teach topic Displays teaching documentation on the given topic. There are currently no PML-specific TEACH files, but some of the general Poplog files (on Ved, for example) may be of interest to new users. If invoked without a parameter, the file TEACH * TEACH is displayed which gives a simple introduction to using Ved and Pop-11. trace identifier ... untrace identifier ... Start and stop tracing the named functions. See HELP * TRACE. ved filename Invokes the Poplog editor, Ved, on the given file; if no filename is given, the most-recently referenced filename is used. See HELP * MLVED ----------------------------------------------------------------------- 3 Invoking Commands From Ved ----------------------------------------------------------------------- All these commands are available from inside Ved too: press the key to get to the command line and type the command as you would to the PML top-level. Example: help mlved showdef + Output produced by commands is sometimes presented differently when called from inside Ved. Other commands available from Ved are described in HELP * MLVED. --- C.all/pml/help/commands --- Copyright University of Sussex 1994. All rights reserved.