comp.lang.ada
 help / color / mirror / Atom feed
From: ka@sorry.no.email (Kenneth Almquist)
Subject: Re: ada and pl/sql
Date: Wed, 29 Mar 2006 18:04:05 GMT
Date: 2006-03-29T18:04:05+00:00	[thread overview]
Message-ID: <p_zWf.16714$W75.16639@trnddc07> (raw)
In-Reply-To: 122gh5o729tsfcf@corp.supernews.com

Jason King wrote:
> declare
>    v1 varchar2(10) := 'Hello';
>    v2 varchar2(10) := 'World';
>    v3 varchar2(30);
> begin
>    v3 := v1 || ' ' || v2 ; -- || is string concat operator.
>                            -- no error here since 'Hello World'
>                            -- fits.
>    dbms_output.put_line(v3) ; -- prints "Hello World"

As others have said, Ada's unbounded_string type is probably what
you are looking for.  For this particular example, the Ada string
type will also work:

  declare
     v1 : constant string := "Hello";
     v2 : constant string := "World";
     v3 : constant string := v1 & ' ' & v2;   -- & is string concat operator.
  begin
     ada.text_io.put_line(v3);     -- prints "Hello World"
  end;




      parent reply	other threads:[~2006-03-29 18:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-27 20:05 ada and pl/sql Jason King
2006-03-27 20:28 ` Georg Bauhaus
2006-03-27 21:07 ` Björn Persson
2006-03-27 21:15   ` Martin Dowie
2006-03-27 23:28     ` Jason King
2006-03-28  2:53       ` Jeffrey Creem
2006-03-29 19:51         ` Martin Krischik
2006-03-29 19:47       ` Martin Krischik
2006-03-29 18:04 ` Kenneth Almquist [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox