@clearoutput
should have a sibling function, ClearOutput()
, just as @output
pairs with Output()
.
Why? Consider this example:
@clearoutput
=Output("Hello")
=Output(file)
Here, @clearoutput
executes after the first Output()
because that function doesn’t reference a file. The second Output()
(with the file reference) runs last.
Result: "Hello" is missing from the log.
Alternative ideas:
- Add a
clear
switch toSet UTILITY
. - Extend
Output()
to support additional arguments.