Consider the following definition:
Piecewise[{{(*comment*)-1, x > 0}, {0, True}}]
This is interpreted as intended, with the comment being simply removed, leaving only -1
in the cell.
But if I enter it via \[Piecewise]
followed by Ctrl+, to get the following result, it's interpreted in a wrong way:
Basically, the (*comment*)
part is replaced with Null
instead of being, as comments are to be, removed completely.
Interestingly, this only happens since Mathematica 8.0 (and is still present in 11.2.0), i.e. I don't reproduce it in 7.0.
So, what's going on here? Has the language or something changed? Or is it simply a front-end bug?
InputForm@ MakeExpression@ StripBoxes@ TagBox[GridBox[{{"\[Piecewise]", GridBox[{{RowBox[{RowBox[{"(**)"}], RowBox[{"-", "1"}]}]}}]}}], "Piecewise"]
$\endgroup$ – Kuba♦ Mar 16 '20 at 12:30