Wolfram Cloud Notebook : Indenting Code

  • Mathematica
  • Thread starter Swamp Thing
  • Start date
  • Tags
    Cloud Code
In summary, the conversation discusses an error that occurs when manually indenting a multiline code block in a notebook on Wolfram Cloud. The speaker asks for advice on indenting code lines and suggests searching for answers online. They also mention a couple of potential solutions found in related threads.
  • #1
Swamp Thing
Insights Author
908
572
TL;DR Summary
Tried manual indenting in multiline code. Got the "Set: Tag Times" error.
I tried adding spaces manually to indent a multiline code block in a notebook on Wolfram Cloud (www.wolframcloud.com). It throws the "Set: Tag Times" error.
1564627803886.png


How can I indent code lines (preferably manually, but auto will also be fine).
 
Physics news on Phys.org
  • #2
Your question is very specific to how this software works. Have you googled for an answer or gone to their website to see if others have had the same problem?

That would be my first thought here.

Also check the related threads at the bottom of the page as there may be some answers there. In one case, I saw it was due to redefining a function:

https://www.physicsforums.com/threads/tag-times-is-protected.860491/
and in another a missing semi-colon:

https://mathematica.stackexchange.c...ify-the-source-of-a-tag-times-protected-error
https://stackoverflow.com/questions...ror-setwrite-tag-times-in-null-w-is-protected
 

1. What is Wolfram Cloud Notebook?

Wolfram Cloud Notebook is a cloud-based computing environment designed for creating, sharing, and deploying interactive documents with Wolfram Language code. It allows for easy collaboration and access to powerful computational tools.

2. How do I indent code in Wolfram Cloud Notebook?

To indent code in Wolfram Cloud Notebook, simply use the Tab key on your keyboard. You can also select multiple lines of code and press Tab to indent them all at once. Alternatively, you can use the code indentation buttons in the toolbar at the top of the notebook.

3. Why is code indentation important?

Code indentation is important for improving the readability and organization of your code. It helps to clearly define the structure and hierarchy of your code, making it easier to understand and debug. Indented code is also more visually appealing and can make your notebook look more professional.

4. Can I customize the indentation settings in Wolfram Cloud Notebook?

Yes, you can customize the indentation settings in Wolfram Cloud Notebook. You can change the number of spaces used for indentation, as well as the behavior of the Tab key. To access these settings, go to the "Preferences" menu, then select "Notebook Options" and click on the "Indentation" tab.

5. Is it possible to undo an indentation in Wolfram Cloud Notebook?

Yes, if you accidentally indent your code or change your mind about the indentation, you can easily undo it. Simply select the indented lines of code and press Shift + Tab to remove the indentation. You can also use the "Decrease Indentation" button in the toolbar.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
21
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • Programming and Computer Science
Replies
1
Views
705
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • Feedback and Announcements
Replies
20
Views
2K
Replies
1
Views
959
  • Computing and Technology
Replies
15
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
279
  • Programming and Computer Science
Replies
14
Views
1K
Back
Top