Navigation

Operators and Keywords

Function List:

C++ API

: run_history
: run_history cmd_number
: run_history first last

Run commands from the history list.

When invoked with no arguments, run the previously executed command;

With one argument, run the specified command cmd_number;

With two arguments, run the list of commands between first and last. Command number specifiers may also be negative where -1 refers to the most recently executed command. For example, the command

run_history
    OR
run_history -1

executes the most recent command again. The command

run_history 13 169

executes commands 13 through 169.

Specifying a larger number for the first command than the last command reverses the list of commands before executing them. For example:

disp (1)
disp (2)
run_history -1 -2
⇒
2
1

See also: edit_history, history.

Package: octave