Formatter bug with inline comments?

The formatter is messing with my comments and apostrophes. It's injecting spaces in a double dash and losing it afterwards.

@@cmf_error_code_ref_mat.dld -- don't move me

changes to:

@@cmf_error_code_ref_mat.dld - - don 't move me

Resulting in the error:
string "'t move me" missing terminating quote (').

I may be about to learn something about comments trailing an @@ call. All of these blow with errors. It seems the Grok is no smarter than me so if anyone finds alternative documentation please share. I'm SQLPlus 19.3 on Windows.

@@file.dld /* Don't stop believin' just for a ' comment */
@@file.dld --/* --Don't stop believin' just for a ' comment */

Grok spew....

Key Points

  • @@ in SQL*Plus: The @@ command is used to execute a script from a file, similar to @, but it searches for the script relative to the directory of the calling script (useful for nested scripts).
  • -- Comments: The -- syntax denotes a single-line comment in SQLPlus (and SQL in general). Anything following -- on the same line is ignored by the SQLPlus parser, provided it’s processed as part of a valid SQL or SQL*Plus command.
  • Line Processing: SQL*Plus processes input line by line, and the presence of -- after @@ affects only the interpretation of that specific line.

Can -- Follow @@?

Yes, you can place a -- comment after an @@ command on the same line, and SQL*Plus will treat everything after -- as a comment, ignoring it. The @@ command itself (and its script reference) will still execute, provided the syntax before -- is valid.

Suprised that this one shows up after so many years ... :smiley:
Will fix it asap, of course (QP-4338)

@chazamania, "All of these blow with errors", the 2nd one fails of course, but am I right that the first one passes, at least I see no diff after formatting, other than the comment moved to the right margin?

Thanks for reporting,
Andre