[GAP Forum] is it possible to suppress displaying a return value from within a function?

Will Chen oxeimon at gmail.com
Sun Oct 24 22:07:41 BST 2021


Dear all,

Normally when you write a function F that returns a value, entering "F();"
into the command line will display the full return value of the function.
You can suppress this output calling the function using the
double-semicolon "F();;" in the terminal.

Is it possible to suppress this output from *within the function*? I.e.,
I'd like to write a function "F" which returns a value, but even when using
the single-semicolon "F();" on the command line, it does not display its
return value.

I'm asking because I'm writing a function whose return value is very long,
and I don't want to accidentally spam my terminal whenever I forget to use
the double-semicolon. Specifically I'd want to be able to enter something
like "X := F();" into the terminal, without seeing a return value.

Thanks,

- Will

-- 

William Chen
Member, School of Mathematics
Institute for Advanced Study
Princeton, NJ, 08540
oxeimon at gmail.com


More information about the Forum mailing list