Toad World® Forums

Incorrect formatting of nested comments


Toad does not format nested comments in the form of /* … */ correctly. It executes them correctly (i.e. no result set is returned), but it fails to color the code correctly.

For example:


Note how the “SELECT * FROM t;” isn’t green like the rest of the comments, and even the final */ is gray and not green. In MS Management Studio the entire section is green, as in:


Pressing F5 just repeats the entire text into the Messages tab, with no result set returned, which is correct behavior. But Toad’s lack of proper formatting can be very confusing. It’s particularly difficult when trying to debug a long piece of code by commenting sections out: you can’t easily tell which sections are commented out because the colors have not changed.




I’ve noticed this in my version to when copy-pasting code. It seems the editor doesn’t check surrounding lines to see if they need their color updated, only the lines directly affected. Do anything to the miscolored line usually fixes the display issue. I’m not certain if this is an outright defect or something they do to improve performance of the intellisense.


Thanks for posting your experience! Unfortunately, in my example above, I can’t seem to force Toad to reformat the SELECT statement as a comment, no matter how I edit it.

This is why I think it must be a genuine parser bug. This is similar to the scientific notation parser bug I noted here:…/14792.aspx

  • KJ


Hello KJ,

I looked into this and was able to apply a fix for the nested block comments. You should see it in the next beta build.


nested block.png


Thanks, looking forward to it!

  • KJ