Hi all,
I'm not sure if I'm just confused or what but the new PL/SQL languages in 8.5
seem a bit off. I have code for Oracle and a language module for PL/SQL that I
created about 2 years ago that I've evolved - mostly to color keywords so I
have a quick indicator when I fat-finger something. I was excited that it was
going to be built into BBEdit, but because of these issues I'm still using my
own module for now. Here they are in no particular order - maybe I'm just
missing something.
1. SQL (PL/SQL) and SQL (Generic) seem switched - SQL (Generic) colors many
keywords that are PL/SQL keywords (BEGIN END EXCEPTION WHEN RETURN) while SQL
(PL/SQL) seems to color a sub-set of basic keywords (SELECT INTO FROM WHERE
FUNCTION)
2. Neither module colors types (NUMBER, VARCHAR2, DATE, TIMESTAMP), common
built-in functions (REPLACE, TO_CHAR, TO_DATE), and less common keywords
(REPLACE, RAISE, NO_DATA_FOUND, TOO_MANY_ROWS). Now this is understandable, as
it is just my preference (I added dbms_output.put_line even though it's not
built in) but the question here is - Is there a way to add personalized
keywords to a built-in language? Basically can I create a language module that
just appends additional keywords to be colored when using SQL (Generic) or SQL
(PL/SQL)...
3. Code folding is not working in either SQL (Generic) or SQL (PL/SQL). When I
got 8.5 installed I looked into my code module and saw that I had left { and }
in it as code block begin and end. I changed them to BEGIN and END and
restarted and code folding works for fuctions and procedures.
4. Function and procedure names don't get found in either module. Same as above
after fixing the block begin and end in my module it began working when using
my module.
Just for reference, I'm including a function that displays most of the issues
detailed above.
Also here is a link to my module: http://homepage.mac.com/dtfarmer/PLSQL.zip
Thanks in advance for any info/insight/advice any of you can provide.
Dan Farmer
----
--
------------------------------------------------------------------------------
--
--
--
----------------------------------------------------------------------------
-- <SQLDOC_METHOD
-- Name ="GET_PRICE_LIST_NAME"
-- Type ="Function"
-- Scope ="Private"
-- Author ="Dan Farmer ([EMAIL PROTECTED])"
-- Created ="13-JUL-2004"
-- >
-- <Purpose > What book is the order in? Return the price list
-- name for the order in question.
-- </Purpose>
-- <Parameters>
-- <Parameter Name ="p_order_number"
-- Type ="IN"
-- Purpose ="the ORDER_NUMBER in question"
-- />
-- </Parameters>
-- </SQLDOC_METHOD>
--
----------------------------------------------------------------------------
FUNCTION GET_PRICE_LIST_NAME
(
p_order_number IN NUMBER
)
RETURN VARCHAR2
IS
l_price_list_name qpbv_price_lists.name%type ;
BEGIN
SELECT qpl.name
INTO l_price_list_name
FROM qpbv_price_lists qpl
, oe_order_headers_all ooh
WHERE qpl.list_header_id = ooh.price_list_id
AND ooh.order_number = p_order_number ;
RETURN l_price_list_name ;
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_price_list_name := NULL ;
dbms_output.put_line('missing price list: '||p_order_number) ;
RAISE pdc_util.lookup_failed ;
WHEN TOO_MANY_ROWS THEN
l_price_list_name := NULL ;
dbms_output.put_line('multiple price lists: '||p_order_number) ;
RAISE pdc_util.lookup_failed ;
END ;
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>