The clc and cls script commands clear the Script Prompt and optionally clear the Script Prompt history.
If focus is on the Script Prompt, a similar function can be performed with Ctrl+L (clears the Script Prompt but not the Script Prompt history) and Ctrl+Shift+L (clears the Script Prompt as well as the Script Prompt history).
Syntax |
Description |
---|---|
clc; cls; Ctrl+L |
Clears the Script Prompt, but does not clear the Script Prompt history. This function does not return any data. |
clc(true); cls(true); Ctrl+Shift+L |
Clears the Script Prompt, and also clears the Script Prompt history. This function does not return any data. |
Example
The following script commands will create a variable "x", clear the Script Prompt, and display the Script Prompt history.
x=1;
clc; # Script Prompt will clear
?history; # display Script Prompt history
result:
x=1;
clc;
?history;
The following script commands will create a variable "x", clear the Script Prompt and Script Prompt history, and display the Script Prompt history.
x=1;
clc(true); # Script Prompt will clear and Script Prompt history will be deleted
?history; # display Script Prompt history
result:
?history;
See Also