How can I define a function with no return value. For example, the Notation function from the Notation package seems to have no return value; I am looking to do the same thing for some of my custom functions.
@Nasser's response in the comments is correct. Returning Null (using a semicolon in the last statement of the function) gives the behavior I was looking for.
Null
? if you end last line in function with;
it returnsNull
. AndNull
is like nothing.seems to have no return value
did you look at theInputForm
of what it returns? SinceNull
does not print to screen. $\endgroup$ – Nasser May 4 '19 at 19:02;
at end you'll get aNull
as return value. So whatever the last thing in the function is what is returned. (Unless you have an explicitReturn[..,Module]
in the middle. I do not know how to make a function not even returnNull
. But may be someone knows... $\endgroup$ – Nasser May 4 '19 at 19:18