3
$\begingroup$

When I execute in Wolfram Mathematica:

s=0.3;
m=5;
x=6;

it works. But when I execute the same on wolframcloud.com it returns Syntax: Incomplete expression; more input is needed.

enter image description here

Is this normal? Does wolframcloud have different syntax?

Update: The cell expression is the following:

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"s","=","0.3"}],";"}],"\[IndentingNewLine]",
  RowBox[{
   RowBox[{"m","=","5"}],";"}]}],"\n",
  RowBox[{
   RowBox[{"x","=","6"}],";"}]}],"Input",
  CellLabel -> "In[28]:= "]

Update: I tried using "\n" or "[IndentingNewLine]" in both cases but cloud still returned an error.

Essentially, this is what Cloud accepts (and it doesn't matter if I use "[IndentingNewLine]" instead of "\n"):

Cell[BoxData[{
 RowBox[{
  RowBox[{"s","=","0.3"}],";"}],"\n",
 RowBox[{
  RowBox[{"m","=","5"}],";"}],"\n",
 RowBox[{
  RowBox[{"x","=","6"}],";"}]}],"Input",
CellLabel -> "In[34]:= "]

So the problem is the extra RowBox[{}] which I have no clew how it ended up like that. Maybe I had deleted something before that. But I guess this suggests that Mathematica failed to evaluate correctly the validity of the expression.

Update: I also realised that pasting the same text inside Cloud and Mathematica, is not being converted into the same cell expression. For example pasting the line:

Solve[{PDF[NormalDistribution[mu, sigma], x] == y, sigma > 0}, x, Reals]

for me works on Cloud but not on Mathematica 10.2. Which either suggests a bug, or different syntax.

$\endgroup$
  • $\begingroup$ The code works on Wolfram Cloud for me. Do you have an invisible character that you accidentally typed? $\endgroup$ – Michael E2 Jan 14 at 15:46
  • $\begingroup$ I updated with an image of what I see. $\endgroup$ – Gouz Jan 14 at 15:49
  • $\begingroup$ Use Show Cell Expression to see what the cell looks like. If you don't know the shortcut, you can go to the settings icon that appears next to the cell bracket, and then select Advanced | Show Cell Expression. If it's not obvious what the problem is, you can edit the contents into your question. $\endgroup$ – Carl Woll Jan 14 at 15:49
  • 3
    $\begingroup$ I think it's the \[IndentingNewLine] character that is the problem. How did you enter the code into the cloud? Actually, I think it's using a mixture of \n and \[IndentingNewLine] that is the issue. Just using one or the other has no issues. $\endgroup$ – Carl Woll Jan 14 at 16:10
  • 5
    $\begingroup$ I think the syntax error issue is a bug and worth reporting to Wolfram support. $\endgroup$ – Carl Woll Jan 14 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.