PL/SQL or me -- which one is more stupid?

From: Steve Frampton, Computer Operator/Systems Clerk <frampton_at_admin.flarc.edu.on.ca>
Date: 1995/09/22
Message-ID: <43uoi2$f7l_at_govonca3.gov.on.ca>#1/1


Hello:

I am writing a calendar-generating application in PL/SQL. I would really like to know why the following code generates two very different results:

declare
  test varchar2(29);
begin
  test:='';
  for i in 1..7 loop
    test := test||' '||'|'; /* 3 spaces */   end loop;

  dbms_output.put_line(test);

  test:='';
  for i in 1..7 loop
    test := test||'***'||'|'; /* 3 stars */   end loop;

  dbms_output.put_line(test);

end;
/

set serveroutput off;
--- end ---

And, here is the output:

This all seems pretty silly, to me. Any ideas?

Thanks in advance...



This article contains my own words formed by my own opinions. I speak on my own behalf and my views do not necessarily agree with those of my employer.
-----------------------------------+-------------------------------------------
Steve Frampton                     | Phone:  (613) 544-4927, extension 331
Computer Operator/Systems Clerk | Fax: (613) 530-4761
Frontenac-Lennox & Addington RCSSB | E-mail: frampton_at_admin.flarc.edu.on.ca
-----------------------------------+-------------------------------------------
-------------------------------------------------------------------------------
This article contains my own words formed by my own opinions. I speak on my own behalf and my views do not necessarily agree with those of my employer.
-----------------------------------+-------------------------------------------
Steve Frampton                     | Phone:  (613) 544-4927, extension 331
Computer Operator/Systems Clerk | Fax: (613) 530-4761 Frontenac-Lennox & Addington RCSSB | E-mail: frampton_at_admin.flarc.edu.on.ca
-----------------------------------+-------------------------------------------
Received on Fri Sep 22 1995 - 00:00:00 CEST

Original text of this message