Previous: A Sample Function Description, Up: Format of Descriptions [Contents][Index]

#### 1.3.5.2 A Sample Command Description

Command descriptions have a format similar to function descriptions, except that the word ‘Function’ is replaced by ‘Command’. Commands are functions that may be called without surrounding their arguments in parentheses. For example, here is the description for Octave’s `diary` command:

Command: diary
Command: diary on
Command: diary off
Command: diary filename

  Record a list of all commands and the output they produce, mixed together just as they appear on the terminal.

  Valid options are:

  on

    Start recording a session in a file called `diary` in the current working directory.

  off

    Stop recording the session in the diary file.

  filename

    Record the session in the file named filename.

  With no arguments, `diary` toggles the current diary state.

  See also: history.