HP Forums

Full Version: Suppress command output.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good morning.

Is it possible to suppress command outputs (e.g. like in matlab, where one uses a semicolon at the end of a command)?

The issue is that while working with giant matrices or CAS results from integrals that normally would fill multiple lines on a sheet of paper, the calculator is busy rendering the results instead of doing useful calculation; I am not interested in the outputs of the commands (e.g. I simply store the result of a program function in some variable to work with it).

If there is no way, maybe I can do something like write a function that takes a command, executes it and stores the result in a variable without producing a return value no?

Can I pass a function with all its arguments as an argument like that: suppress(var, func(a,b,c,d,e,f)) or would that not be possible?

Kind regards
zero(x) := 0 Big Grin

Cas> zero(m:=makemat((j,k)->j+k,3,2))       → 0
Cas> zero(m := transpose(m))       → 0
Cas> m       → [[2,3,4],[3,4,5]]
(05-13-2021 11:40 AM)Albert Chan Wrote: [ -> ]zero(x) := 0 Big Grin

Cas> zero(m:=makemat((j,k)->j+k,3,2))       → 0
Cas> zero(m := transpose(m))       → 0
Cas> m       → [[2,3,4],[3,4,5]]

A godsend. Why did I not see this.
XCas suppressing output shortcut ":;" also work in HP Prime emulator.

CAS> m := makemat((j,k)->j+k,3,2) :;       → "Done"
Reference URL's