Skip to Content
author's profile photo Former Member
Former Member

concatenation with blank space

t1 = 'hello'

t2 = ' '

t3 = 'india'

concatenate t1 t2 t3 into t4.

output comes 'helloindia'.

what shud we do to get 'hello india'.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

12 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 25, 2006 at 10:15 AM

    Hello Madan,

    Correct statement would be

    CONCATENATE T1 T3 INTO T4 SEPARATED BY SPACE.

    I feel, logically you require space in between T1 and T3. and not between all the three variables.

    Hope this is helpful.

    Gaurav.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 25, 2006 at 10:12 AM

    add the addition separated by space.

    t1 = 'hello'

    t3 = 'india'

    concatenate t1 t3 into t4 separated by space.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 25, 2006 at 10:12 AM

    Hi Madan,

    You will need to use the addition SEPARATED by spaces. If you wish to have more then one space then you will have to use offset to achieve the same. Concatenate will remove more then one space.

    Hope this helps

    Cheers

    Vj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 25, 2006 at 10:13 AM

    Hi,

    U can use the following.

    Concatenate t1 t2 t3

    into t4

    separated by space.

    Regards,

    Amit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 25, 2006 at 10:14 AM

    hi ,

    concatenate v_str1 v_str2 into v_res<b>separated by space</b>.

    this gives a space between the strings in the resultant string.

    Regards,

    Sailaja.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 25, 2006 at 10:15 AM

    hi,

    try these..

    t1 = 'hello'
    t3 = 'india'
    
    concatenate t1 t3 into t4 separated by t2.

    <b> or</b>

    t1 = 'hello'
    t3 = 'india'
    
    concatenate t1 t3 into t4 separated by space.

    Regards

    vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 25, 2006 at 10:16 AM

    Hi,

    Try

    concatenate t1 t3 into t4 SEPERATED BY SPACE.

    Regards,

    Tanveer.

    Mark helpful answers

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 25, 2006 at 10:20 AM

    Hai Madan

    Try with this Code

    data : t1(5) type c value 'hello',

    t2(1) type c value ' ',

    t3(5) type c value 'india',

    t4(11) type c.

    concatenate t1 t3 into t4 separated by space.

    write : / t4.

    Thanks & regards

    Sreenivasulu P

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 25, 2006 at 10:20 AM

    hi,

    If you are sure that if only t2 contains space, you can do like this.

    t1 = 'hello'. t2 = ' '. t3 = 'india'. t4 = 'one'.

    concatenate t1 t3 into t5 separated by space.

    concatenate t5 t4 into t6.

    Regards,

    Sailaja.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 25, 2006 at 10:28 AM

    Hi Madan,

    t1 = 'hello'

    t3 = 'india'

    concatenate t1 t3 into t4 separated by space.

    or

    concatenate t1 t3 into t4 separated by ' ' .

    regards,

    kiran.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.