Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

What is \\ for? Help finds nothing on it. An odd number of backslashes greater than one are grouped by two and the last one is displayed with a different color. This indicates that it should mean something.

There also is a (connected?) little bug in the frontend (Mma 8.0, W7). When a text what is ended by the odd number of backslashes is commented with Alt+/, pressing the combination again leads not to uncommenting, but to further commenting like this:

a\\\
(*a\\\*)
(*(*a\\\*)*)
(*(*(*a\\\*)*)*)

etc.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

From the tutorial Special Characters - Strings And Characters

enter image description here

example

enter image description here

Comment/Uncomment behavior you describe also happens in version 8.0.4.0 on Vista.

share|improve this answer
    
Thanks. Judging from this a combination \* is also treated specially (that could prevent Mma from recognizing the ending of the comments *)), though it is not mentioned in help. –  Andrew Apr 22 '12 at 9:36
    
@Andrew, thanks for the accept. Un/Comment function behaves differently depending on the selection. For example, when the selection is cell bracket, Un/Comment works as you expect. From the code for the Un/Comment function in the file GetFEKernelInit.tr in the directory $InstallationDirectory\SystemFiles\FrontEnd\TextResources, you can see how it treats various selection cases. –  kguler Apr 22 '12 at 11:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.