Post Reply 
Suppress command output.
05-13-2021, 08:04 AM (This post was last modified: 05-13-2021 08:34 AM by t_angenbrandt.)
Post: #1
Suppress command output.
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
Find all posts by this user
Quote this message in a reply
05-13-2021, 11:40 AM
Post: #2
RE: Suppress command output.
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]]
Find all posts by this user
Quote this message in a reply
05-13-2021, 07:25 PM
Post: #3
RE: Suppress command output.
(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.
Find all posts by this user
Quote this message in a reply
07-16-2021, 01:47 AM
Post: #4
RE: Suppress command output.
XCas suppressing output shortcut ":;" also work in HP Prime emulator.

CAS> m := makemat((j,k)->j+k,3,2) :;       → "Done"
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)