Every active script and shell session has a console associated with it. It is displayed if a script or session is selected from the script list.
The console is a simple text viewer displaying the output of the print statement (and the io.stdout stream). In interactive shells, it also serves to input the m statements to be executed.
![]() | ![]() | |
To start or continue execution,
| Series 60: | Press the confirm button. |
| UIQ: | Press the button. |
Console text is frozen up to the point of last output. In interactive shells, this is typically all text up to the last m> prompt.
The console has a command history. A certain number of previous inputs can be recalled:
| Series 60: | Press the down key. |
| UIQ: | Press the button, or use Process→Edit Source. |
The console will cycle through the previous inputs.
The console offers the following menu options:
| Process→Go | Run the script or command. |
| Process→Stop | Stop a currently executing script or command. |
| Process→Close | Close this script's console, or close the shell session. |
| Process→Edit Source | Edit the source associated with the script, or recall the previous input. |
| Process→Compile | Compile the script into a .mex file which can be executed directly; see also section * (). |
| Process→Auto Go | Toggle the "auto go" state of the script or executable. If "auto go" is enabled (indicated by a or icon), the script or executable is started automatically whenever the m application starts.
Note that scripts are only started if they reside in the current directory. Executables are always started. |
| Process→Save Output | Save the console text to a file, using the current source file encoding. |
| Process→Clear Output | Clear the console, i.e. remove all text. |
| Process→View Size | (S60 only): toggle the view size, showing or hiding the title pane. |
| Edit→Back | (S60 only) return to the script list. |
| Edit→Help | Show the help for the text before the cursor (see chapter * ()). |
| Edit→Error Trace | Show the error traceback for the last runtime error (see chapter * ()). |
| Edit→Copy | Copy the selected text to the clipboard. |
| Edit→Cut | Cut the selected text to the clipboard. |
| Edit→Paste | Paste text from the clipboard. |
| Edit→Find | Open a find/replace dialog and start find mode (see section * ()). |