What is wrong with the following statement?
shift-enter which asked for echo each statement.
But as I typed again
The A is not assigned? But B is assigned Why?
See the attached screen.
I do not know.
I can surely do the alternative. But that does not answer my question.
Can you do it as I did, (i.e. two assignment together) so that you are discussing my problem. Thanks.
Done with Mathematica V12:
I do not know whether there is a change regarding this subject among V11.2 and V12
In a notebook cell, remember to put a semicolon (;) at the end of each statement:
A = "abcdef"; (* <- semicolon *)
B = "cedfr"
Otherwise you may be rmultiplying:
FullForm[Hold[A = "abcdef"
B = "cedfr"]]
(* Hold[Set[A,Set[Times["abcdef",B],"cedfr"]]] *)
Why? I know semi-column. But, it is not necessary.
If you do not want echo you put a semi-column. If you want it echo no semi-column.
That is the rule I learnt.
My statements are not interpreted as multiplying. Suppose MATHEMATICA interpreted it as multiplying I won't get those two correct echos, i.e. A is not assigned but echoed, while B is assigned.
Is there anyway to debug my program? To see how does Mathematica interpret my statement? Perhaps, a FullForm?
I've just tried your example in a V11.3 notebook and it works as I'd expect - see below and attached.
Not sure why your notebook is behaving as you've described. Can you attach it?
All the best,
Possibly a silly question, but did you evaluate your input cell 11 (the one containing just A)?
Thank you for your attention of my problem.
I am using 11.2
I did not notice the notebook I posted did not evaluate A
This time I start the MATHEMATICA from the start manual it works. But there is a line below (assuming....) I do not understand what does that mean?
Previously I clicked a xxx.m file to start the MATHEMATICA. Why? What is the difference?
The problem turns out to to be related to how did I entered those two command.
If I entered by hand, no problem.
If I loaded them from a .m file (clicking the .m file to start MATHEMATICA) there is a problem.
Could anyone explain the problem?