The command-mood can be recognized by the message <#8002#>Command, please...<#8002#> on the right-hand side of the status line. In command-mood, the commands listed below are accepted. Most of them have the focus as an implicit parameter. After the execution of each command the Elan Programming Environment prompts with the current focus and returns to the command-mood.
The focus-command shows <#8005#>Focussing...<#8005#> on the status line, and asks for the name which should become the focus of interest. So the focus-command can be used to focus on a new name, thus allowing navigation over program parts.
The focus-command allows a defined name to be abbreviated by replacing its last characters by a star (e.g. <#8006#>prog*<#8006#>). The Elan Programming Environment then searches the name list for a match, and complains <#8007#>Known name ?<#8007#> if no match is possible.
The edit-command serves to assign a new definition to the focus, or to modify the definition of the focus.
The name and (if present) the body of the definition whose name is the focus are shown on the screen and an opportunity is given for local editing. On the status line <#8009#>Input, please...<#8009#> is displayed (see 5.4 for a description of the edit-mood).
The definition of the focus is shown on the screen. In case the focus is generic, the definition indicated by the cursor is shown (the cursor can be moved to another definition of focus by the next-command <#8011#>n<#8011#>). Immediately after the execution of a program it is also possible to focus on an object created during the execution; in that case its type, access attribute, name and value can be inspected by the show-command.
The next-command serves to move the cursor over the various definitions of a generic name. It has no effect for non-generic names.
The execute-command serves to execute the program whose root is the focus. It shows <#8014#>Executing...<#8014#> on the status line. After execution of a program, its objects (variables and constants) can be inspected by means of the show-command. At the start of an execution, all objects are made undefined. See section 5.5 for a description of the execute-mood.
Same as the execute-command, but the execution takes place in trace-mood. This mood is recognized by the request <#8016#>Trace command, please...<#8016#> on the status line. See section 5.5 for a further description of the trace-mood.
Special form of tracing execute-command, in which the types of the syntactical constructs are shown rather than their values. This mode is recognized by the request <#8018#>Verify command, please...<#8018#> on the status line. See section 5.5 for a further description of the verify-mood.
The list-command serves to give a overview of all names having a visible definition. This overview begins with a bottom-up part (a list of all names with type <#8020#>LET<#8020#>, <#8021#>PROC<#8021#>, <#8022#>OP<#8022#> or <#8023#>TYPE<#8023#>).
After this a structured overview of the refinements of the program is given. If the focus is a refinement, the names of all refinements which appear in its body are displayed with a suitable indentation on the next line(s). The process is invoked recursively if a refinement is expressed in terms of other refinements, with the exception that no name appears more than once in this overview. As a consequence the overview gives an indication about the structure of the focus, considered as root of a program.
After this overview a list is given of all refinements which remain, and so are no part of the program having the focus as root. Some of them might be candidates for deletion.
Names from the built-in library (see appendix A) and from a packet are not listed. It is however possible to focus on a library name and show its definition.
The delete-command deletes the definitions of the current focus.
The Elan Programming Environment asks for confirmation (to be answered with <#8025#>y<#8025#> or <#8026#>n<#8026#>) before doing anything so drastic. It gives a warning before deleting definitions from the standard library.
The read-command serves to read a program, which was previously written to a file, back into memory. It reports <#8028#>Reading...<#8028#> on the status line. It adds the definitions of that program to the current contents of the memory, overwriting refinements with the same name. It may be necessary to first save the current program by writing it to a file (<#8029#>w<#8029#>), or to first clear the memory (<#8030#>c<#8030#>). The read-command asks for the name of a file. If a file with that name is present, the program it contains is read. After reading, <#8031#>program <#8031#>will be the new focus. During the reading of the program, the names of the definitions are listed on the display. Finally a structured overview is given of all definitions.
If a file with the desired name was not present the Elan Programming Environment produces an overview of all program files that are present (again a negative menu).
The conventions for file names are those of the operating system running the Elan Programming Environment.
The packet-command also serves to read a program into memory. It reports <#8033#>Reading...<#8033#> on the status line. It is a variant of the read-command, with the following differences:
The write-command serves to write all visible definitions from memory with the root as the first refinement onto a file. It reports <#8037#>Writing...<#8037#> on the status line. It asks the user for a file name. Any existing file of that name is overwritten. Hidden definitions (see the packet-command) are not written.
The conventions for file names are those of the operating system running the Elan Programming Environment.
The clear-command, upon confirmation, clears the memory, bringing the Elan Programming Environment back into its initial state. It reports <#8039#>Clearing...<#8039#> on the status line.
The quit-command, upon confirmation, halts the Elan Programming Environment and returns control to the operating system of the computer.