Message Boards Message Boards

0
|
6754 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Avoid syntax issue in cloud notebooks (" _." converted to "_" and ".")?

Posted 5 years ago

I have found what I am certain is a bug in wolfram cloud. I generate the following code in Mathematica and then save it to the cloud.

Clear["Global`*"]
List@@Expand[(1+x)^6]/.a_. x^b_.->{b,a}

This initially runs correctly in the cloud notebook. But if I edit the notebook on the cloud, for example changing the exponent in the expansion from 6 to 7, then running the notebook results in a syntax error. I looked at the text on the cloud after editing the notebook and the " _." has been converted to separate objects, "_" and ".".

POSTED BY: Mike Luntz
2 Replies
Posted 5 years ago

Thanks for the workaround suggestion Jan.

POSTED BY: Mike Luntz

Thanks for the report! This is a cloud bug indeed. Incidentally, we're already working on an overhaul of our client-side input tokenizer (where this is currently going wrong) that will fix this issue. I've still filed a bug ticket in our system (just for reference: CLOUD-15982).

As a workaround for now, you could use an explicit Optional wrapper, i.e.

Optional[a_]

instead of:

a_.
POSTED BY: Jan Poeschko
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract