# Formatter garbles comment, causing syntax errors

**URL:** <https://forums.toadworld.com/t/formatter-garbles-comment-causing-syntax-errors/40004>\
**Category:** Toad for Oracle - Beta\
**Created:** [September 18, 2017, 11:37pm UTC](https://forums.toadworld.com/t/formatter-garbles-comment-causing-syntax-errors/40004 "2017-09-18T23:37:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kornelis.abe](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@kornelis.abe](https://forums.toadworld.com/u/kornelis.abe)\
**Post date:** [September 18, 2017, 11:37pm UTC](https://forums.toadworld.com/t/formatter-garbles-comment-causing-syntax-errors/40004/1 "2017-09-18T23:37:48Z")

</div>

All,

This relates to Toad for Oracle, Beta 12.12.0.29.

The following line:  
@…\Packages\sys\_utils.pks – pre-declare because it’s used by install package

is reformatted as follows:  
@…\Packages\sys\_utils.pks - - pre-declare because it 's used by install package

Two undeserved spaces are inserted:

1. between the two dashes, causing the comment to be turn into ‘code’ ☹
2. before the single quote in “it’s”

The problem is of course the space in between the two dashes.  
IT causes the single quote in the comment to be treated as part of the code,  
turning everything that follows the quote into a long literal ☹

Changing the comment dashes into /\*\*/ does not work either:  
the formatter will insert a space between the initial slash and star, with the same detrimental effect on my code.

Would you please fix this?

# Kind regards, Abe Kornelis

---

<div class="post-metadata">

**Author:** ![avergison](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/avergison/32/66_2.png) [@avergison](https://forums.toadworld.com/u/avergison)\
**Post date:** [September 20, 2017, 9:49am UTC](https://forums.toadworld.com/t/formatter-garbles-comment-causing-syntax-errors/40004/2 "2017-09-20T09:49:42Z")

</div>

Abe,

I’m afraid the end-of-line comment is not valid. SQL\*Plus manual says:

_For SQL\*Plus commands, you can only include “- -” style comments if they are on a_ _line by themselves. For example, these comments are legal:_

_– set maximum width for LONG to 777_  
_SET LONG 777_

_This comment is illegal:_

_SET LONG 777 – set maximum width for LONG to 777_

_If you enter the following SQLPlus command, SQLPlus interprets it as a comment and does not execute the command:_

_– SET LONG 777_

But for the multi-line comment /_…_/ you have a good point, this should work indeed - provided you leave a space after the /\* as the manual describes (/_comment_/ is not valid, but /\* comment\*/ is).

I fixed this for 5.319 parser. (QP-2615)

Thanks,  
Andre

---

<div class="post-metadata">

**Author:** ![kornelis.abe](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@kornelis.abe](https://forums.toadworld.com/u/kornelis.abe)\
**Post date:** [September 22, 2017, 12:08am UTC](https://forums.toadworld.com/t/formatter-garbles-comment-causing-syntax-errors/40004/3 "2017-09-22T00:08:27Z")

</div>

Andre,

thanks for the fix.

I’m not saying the manual is wrong - but the end-of-line comment has worked quite ok for the @ command,  
probably because it is not expecting (and not checking) any arguments beyond the indicated path and file.

I’ll change the end-of-line comments to proper comments to accommodate to the documented version of the truth 😉

# Kind regards Abe
