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.