Questions tagged [comment]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
17
votes
1answer
370 views

Add spaces to Mathematica comment delimiters?

Not exactly the world's most pressing problem, but one that has now exceeded my tolerance level. If I comment out a line of input such as f[x_]:=x+1; with Alt-/ (...
3
votes
5answers
662 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 ...
68
votes
4answers
84k 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 ...
8
votes
1answer
258 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, ...
7
votes
2answers
340 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 ...
4
votes
1answer
176 views

Unexpected result when reading Cell with comment-lines by NotebookRead

Bug introduced in 9.0 and fixed in 9.0.1 When considering this question about re-formatting Cell (also this one), I encountered an issue which confuses me. I'll ...
1
vote
1answer
135 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 ...