How to convert TEXT to CHAR.

sunmorningindiasunmorningindia Member Posts: 65
Is there any way to convert Text to Char.

Comments

  • krikikriki Member, Moderator Posts: 9,110
    globals:
    txtSomeText TEXT100
    chrSomeChar CHAR
    int INTEGER
    FOR int := 1 to STRLEN(txtSomeText) DO BEGIN
      chrSomeChar := txtSomeText[int];
      MESSAGE('Char=%1',chrSomeChar);
    END;
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • kinekine Member Posts: 12,562
    Just additional info>

    result of
    myTextVar[xxx]
    
    itself is Char (xxx is integer within 1..STRLEN). It means you do not need to use the Char variable. Of course for this example it is good for demonstration :wink:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • vaibhavgoel_1vaibhavgoel_1 Member Posts: 7
    You can use EVALUATE function
Sign In or Register to comment.