From: hpuxrac on
On Dec 21, 7:45 am, Daneel Yaitskov <rtfm.rtfm.r...(a)gmail.com> wrote:

snip

> Hi List,
>
> I use Oracle 10 XE. I'm a student. When I wrote my lab then I had found
> that Oracle alerts about an error for the line:
>
> call echo('dddddd'); -- comment
>
> But it processes normally this line without the comment:
>
> call echo('dddddd');
>
> The PL script is entirely:
>
> set serveroutput on;
> create or replace  procedure echo(msg varchar ) as
> begin
>      dbms_output.put_line (msg);
> end;
> /
>
> call echo('dddddd'); -- comment
> -- the end of script
>
> P.S. I have finished  study of Oracle and my opinion have been
> apparently get negative. It doesn't concern Oracle's performance or
> one's stability for overloads because I made only simple demo jobs.
> Therefore I cannot say about it. But as Oracle's user say to work very
> uncomfortable with Oracle.
> PL translator works rather silent and doesn't show a precise line number
> with an error.

What a very fine piece of plsql!

PLSQL has a debugger either in SQL Developer or a tool like Toad. I
think you need to do some more labs perhaps!

Have fun.

From: Mark D Powell on
On Dec 21, 7:45 am, Daneel Yaitskov <rtfm.rtfm.r...(a)gmail.com> wrote:
> Hi List,
>
> I use Oracle 10 XE. I'm a student. When I wrote my lab then I had found
> that Oracle alerts about an error for the line:
>
> call echo('dddddd'); -- comment
>
> But it processes normally this line without the comment:
>
> call echo('dddddd');
>
> The PL script is entirely:
>
> set serveroutput on;
> create or replace  procedure echo(msg varchar ) as
> begin
>      dbms_output.put_line (msg);
> end;
> /
>
> call echo('dddddd'); -- comment
> -- the end of script
>
> P.S. I have finished  study of Oracle and my opinion have been
> apparently get negative. It doesn't concern Oracle's performance or
> one's stability for overloads because I made only simple demo jobs.
> Therefore I cannot say about it. But as Oracle's user say to work very
> uncomfortable with Oracle.
> PL translator works rather silent and doesn't show a precise line number
> with an error.
>
> Daneel Yaitskov.

You need to turn serveroutput on in the session that calls you test
procedure.

[sqlplus example]
set serveroutput on size n
execute ech('TESTECHO')

Also be aware that package dbms_output was actually introduced as a
debugging tool, It does not issue output until the routine
terminates. There are better options available for reporting namely
pro* languages and the utl_file package. Package dbms_output has
routines to support its use by non-interactive applications.

Oracle provides a free development environment and there are several
other free and commercial tools that provide line by line debugging
capabilities. The PL/SQL errors are no worse than what you get from a
'C' compiller.

HTH -- Mark D Powell --


From: Tim X on
hpuxrac <johnbhurley(a)sbcglobal.net> writes:

> On Dec 21, 7:45 am, Daneel Yaitskov <rtfm.rtfm.r...(a)gmail.com> wrote:
>
> snip
>
>> Hi List,
>>
>> I use Oracle 10 XE. I'm a student. When I wrote my lab then I had found
>> that Oracle alerts about an error for the line:
>>
>> call echo('dddddd'); -- comment
>>
>> But it processes normally this line without the comment:
>>
>> call echo('dddddd');
>>
>> The PL script is entirely:
>>
>> set serveroutput on;
>> create or replace  procedure echo(msg varchar ) as
>> begin
>>      dbms_output.put_line (msg);
>> end;
>> /
>>
>> call echo('dddddd'); -- comment
>> -- the end of script
>>
>> P.S. I have finished  study of Oracle and my opinion have been
>> apparently get negative. It doesn't concern Oracle's performance or
>> one's stability for overloads because I made only simple demo jobs.
>> Therefore I cannot say about it. But as Oracle's user say to work very
>> uncomfortable with Oracle.
>> PL translator works rather silent and doesn't show a precise line number
>> with an error.
>
> What a very fine piece of plsql!
>
> PLSQL has a debugger either in SQL Developer or a tool like Toad. I
> think you need to do some more labs perhaps!

or simply use sqlplus and type 'show errors'

Tim

>
> Have fun.
>

--
tcross (at) rapttech dot com dot au
From: Daneel Yaitskov on
ddf wrote:
> because what's happening is this:
>
> BEGIN echo('dddddd'); --comment; END;
>
> Notice your comment in this context is considered as actual (but
> invalid) code. Do this instead:


You must admit that such behavior strong differentiate from others
languages for the rule of one-line comment. Solid bulk of languages

C++, Bash, C#, Haskell, Lisp, TeX etc. consider that one-line comment
can begin in any place of a line excepting strings (a text between ").

I guess major portion of PL/SQL programmers have first language Basic,
Pascal or C.


My resume is this feature tends to errors.
But I don't see any causes that PS/Sql's syntaxes must differentiate
from the mainstream languages.

Daneel Yaitskov
From: Steve Howard on
> But I don't see any causes that PS/Sql's syntaxes must differentiate
> from the mainstream languages.
>
> Daneel Yaitskov

This makes no sense to me. This is not a multi line comment in
java...

"""
useless comment
"""

....but is in python. However,

/*
another useless comment
*/

....does work in java, but not python.

That is one of the reasons different lanaguages exist, to serve
different needs. I don't think comment syntax is a reason to suggest
a language is not useful.