formating text into integer field

shwetashweta Member Posts: 94
i have a text filed like 20 X 3800,30 X 400,.....
now i want to display as
20 X 3800
30 X 400
how it can be done
its urgent

Comments

  • AlbertvhAlbertvh Member Posts: 516
    Hi

    You could try this
    Text1 := COPYSTR(MyText,1,STRPOS(MyText,',') - 1);
    Text2 := COPYSTR(MyText,STRPOS(MyText,',') + 1);
    

    Hope this helps

    Albert

    Edit
    MyNewText := MyText;
    WHILE STRPOS(MyNewTEXT,',') <> 0 DO BEGIN
      I := I + 1;
      Text[I] := COPYSTR(MyNewText,1,STRPOS(MyNewText,',') - 1);
      MyNewText := COPYSTR(MyNewText,STRPOS(MyNewText,',') + 1);  
    END;
    I := I + 1;
    Text[I] := MyNewText;
    

    Text is defined as an array of Type Text
Sign In or Register to comment.