@clearoutput: modifier needs companion function

@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 to Set UTILITY.
  • Extend Output() to support additional arguments.

We've added this for the next update.

2 Likes