1,852
edits
(→Comments: wiki markup) |
(→Command evaluation: wiki markup) |
||
Line 22: | Line 22: | ||
The output of every command is printed to the console unless terminated with | The output of every command is printed to the console unless terminated with | ||
a semicolon <code>;</code>. The | a semicolon <code>;</code>. The [https://www.gnu.org/software/octave/doc/interpreter/XREFdisp.html disp] command can be used to print output | ||
anywhere. Use | anywhere. Use [https://www.gnu.org/software/octave/doc/interpreter/XREFquit.html exit] or [https://www.gnu.org/software/octave/doc/interpreter/XREFquit.html quit] to quit the console. | ||
Read more | Read more [https://www.gnu.org/software/octave/doc/interpreter/Simple-Examples.html about command evaluation]. | ||
<syntaxhighlight lang="octave">t = 99 + 1 # prints 't = 100'</syntaxhighlight> | |||
<syntaxhighlight>t = 100</syntaxhighlight> | |||
<syntaxhighlight lang="octave">t = 99 + 1; # nothing is printed | |||
disp(t);</syntaxhighlight> | |||
<syntaxhighlight> 100</syntaxhighlight> | |||
= Elementary math = | = Elementary math = |