Posted By: zakko Nested Comments Faulty - 10/27/22 02:55 PM
PL/SQL-Developer 15.0.2.2054 (64 bit) has issues with nested multi-line comments.

Given the following comments:

Code
/* 
  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  /* Ut enim ad minim veniam, quis nostrud exercitation ullamco
  laboris nisi ut aliquip ex ea commodo consequat.
  Duis aute irure dolor in reprehenderit in voluptate velit esse
  cillum dolore eu fugiat nulla pariatur. */

  Excepteur sint occaecat cupidatat non proident, sunt in culpa
  qui officia deserunt mollit anim id est laborum.
*/

The lines starting at "Excepteur..." would not be commented out in PL/SQL-Developer.
Posted By: Marco Kalter Re: Nested Comments Faulty - 10/28/22 09:02 AM
We'll check it out.
Posted By: JerryLee Re: Nested Comments Faulty - 10/29/22 10:44 AM
In face , It's not support in sqlplus environment . So I guess comment of "/* */" format could not be nested .
Posted By: zakko Re: Nested Comments Faulty - 11/02/22 01:03 PM
True, it looks like according to Oracle nested multiline comments should throw a syntax error:
https://docs.oracle.com/en/database...UID-2722A49F-C233-4DDF-B236-10EE3DD6B79B

But personally I do not get what's the reason for that limitation by Orcale.
Posted By: jhughes Re: Nested Comments Faulty - 11/02/22 01:32 PM
When the first /* is encountered, Oracle begins ignoring all subsequent text until it finds the first occurrence of */. Oracle doesn't "see" the second /* as it is within a comment, which Oracle is not syntax parsing. Once the first */ is encountered, Oracle resumes syntax checking. It runs across the second */ and given the parser is not tracking a currently open /*, it throws an error.

Their approach makes logical sense and it is what Oracle documented. You don't have to agree with it, but it's how the language works and so PSD would/should parse the data the same way and not treat the text starting with "Excepteur..." as a comment.
© Allround Automations forums