The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
53 views

Tab in Input cell

Why is it impossible to use tab to indent e.g. an inline comment i.e. (* ... *) in an Input cell? However, I have seen that it is possible, if I use Cell>ConvertTo>TextDisplay. The cell remains ...
7
votes
2answers
80 views

Undo history cleared after removing comments - bug?

If I've written some code followed by a comment, like this: x(*y*) and I remove the comment by first removing the right delimiter and then the left, my undo ...
18
votes
3answers
320 views

Why does a comma insert a line break in a comment?

I like to include capital letters and punctuation in my comments. But when I put a comma into a Mathematica comment of the (* ... *) type, it usually causes the comment line to break, with a new line ...
5
votes
2answers
74 views

Annotation specifier like :Author: and sectioning like ::Section:: in package code

In packages, there is a special way to make basic formatting and annotation within normal comments. Here is another question related to annotation. Package file headers usually contain information ...
1
vote
0answers
49 views

Is there any metadata-holding mechanisms in Mathematica programming similar to Java annotations?

I'm re-implementing some tools previously implemented in Java in Wolfram Language. Is there any metadata-holding mechanisms in Mathematica programming similar to Java annotations?
0
votes
1answer
145 views

What is the comment shortcut?

I went to a Wolfram Technologies workshop a few weeks ago and the presenter showed us a keyboard shortcut that when a block of input is selected, the shortcut puts the block of selected input in ...
0
votes
0answers
67 views

Mathematica comments disappeared

I pressed Ctrl+Shift+N by mistake and all my comments in the active cell disappeared! Unfortunately, I missed the chance to undo that operation. Does anyone know how to let them reappear?
7
votes
2answers
207 views

Behaviour of out (%%…%) with comments

Can please someone explain to me the diffrent behavior of this code (6 - 3); (5 - 3); (4 - 3); {%%%, %%, %} Out= {3, 2, 1} and this one ...
1
vote
1answer
97 views

How to programmatically comment out multiple source files?

How to programmatically comment out the entire content of multiple .m source files assuming they start with correct Mathematica syntax? I need it to be robust so ...
4
votes
1answer
136 views

Unexpected result when reading Cell with comment-lines by NotebookRead

When considering this question about re-formatting Cell (also this one), I encountered an issue which confuses me. I'll let the code itself speak: Consider the ...
8
votes
1answer
178 views

Converting to InputForm or StandardForm without deleting comments

Following on from this question: Is it possible to convert an expression to InputForm or StandardForm without losing the comments? For example, ...
3
votes
5answers
439 views

How to write a function to remove comments from a .m source file preserving formatting such as line wrapping reasonably?

How to write a function to remove comments from a .m source file preserving formatting such as line wrapping reasonably? This means if I have ...
29
votes
4answers
14k views

Is there a syntax for single-line comments for notebooks?

I'm aware that I can use (* ... *) to comment out stuff in a notebook. Many languages have a syntax for single-line comments, such as ...