I would like to understand what happens when we include a comment at the end of a line that ends with a semicolon.
For example, if you execute
x;
%/.{x->1} (*some comment*);
%
you obtain 1
. However, the following code:
x;
%/.{x->1};(*some comment*)
%
ignores the rule and the output is x
.
The point is that if I remove the comment (*some comment*)
from any of these two cases, the result is correct. So, what is the role of the position of the comment in all of this?
I do not know if it is a bug in my version (11.0) or if I have misunderstood something (related with the real meaning of ";" as a composition of expressions, or with the correct use of comments).