concatenate char to string

navsharenavshare Member Posts: 49
Hi

I have some character which i want to concatenate as a string.
i derived this character from a different string using for loop and stored into array.
Pls tell me how to proceed further to concatenate again as a string.

Comments

  • navnaidunavnaidu Member Posts: 15
    Hi,

    I think you should take the array datatype as a text with size 1 then you can add the array characters.

    EX:- Arr as text datatype with size 1.
    arr[1] := 'N';
    arr[2] := 'a';
    arr[3] := 'v';
    Now we want to concatenate the char to string so,

    txt as text datatype.

    use the for loop to add char.
    txt += arr;


    Regards,
    gbnaidu.
  • navsharenavshare Member Posts: 49
    hi

    I too tried previously in the same way as u told.i made a small mistake regarding the datatype conversion.
    Now i got the result.
    Thanks =D>
  • navnaidunavnaidu Member Posts: 15
    Hi,

    You are welcome....


    Regards,
    gbnaidu.
  • Mike_HWGMike_HWG Member Posts: 104
    If you are working with text datatypes that are longer than size 1:

    InputText as text datatype with size 1024
    OutputText as text datatype with size 1024

    OutputText += FORMAT(InputText[1]);
    Michael Hollinger
    Systems Analyst
    NAV 2009 R2 (6.00.34463)
Sign In or Register to comment.