Toad World® Forums

Formatter garbles comment, causing syntax errors


This relates to Toad for Oracle, Beta

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’ :frowning:
  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 :frowning:

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


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

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 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 :wink:

Kind regards