W3cubDocs

/Octave

1.3.5.2 A Sample Command Description

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

diary
diary on
diary off
diary filename
[status, diaryfile] = diary

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 input or output arguments, diary toggles the current diary state.

If output arguments are requested, diary ignores inputs and returns the current status. The boolean status indicates whether recording is on or off, and diaryfile is the name of the file where the session is stored.

See also: history, evalc.

© 1996–2018 John W. Eaton
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.
https://octave.org/doc/interpreter/A-Sample-Command-Description.html