Editor: What is special about keyword "pro"?

Whenever the word “pro” appears in the editor, the rest of the line is not highlighted correctly.

What is special about the word “pro”?

TOAD_Keyword_PRO.png

DECLARE
pro VARCHAR2(20) := ‘HELLO WORLD’;
BEGIN
dbms_output.put_line( pro || ‘TEST’ ); – comments also not highlighted
END;

DECLARE
pro2 VARCHAR2(20) := ‘HELLO WORLD’;
BEGIN
dbms_output.put_line( pro2 || ‘TEST’ ); – comments also not highlighted
END;

PRO and PROMPT are synonymous SQLPlus commands and they highlight the remainder of the line using the SQLPlus Keyword highlighting style. You can remove PRO from the SQLPlus Keyword list on the Editor|Font and Styling page in options. Select the SQL tab, Styling sub-tab, SQLPlus Keyword item.

Thanks for clarifying. I’m surprised that this is triggered in the middle of a PL/SQL block, but I guess changing that is just not worth the trouble.

It’s a speed vs. accuracy dilemma. Lexing is currently done using very simple string comparisons and limited saving of state information. It’s not 100%, but it’s good enough in most cases. We could use the parser for highlighting which would be very accurate, but much slower. Another Toad product uses it and loading larger text takes a while for the highlighting to catch up. I don’t see using the parser as a good solution for dynamic text.

Michael