How to convert TEXT to CHAR.

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

Comments

  • kriki
    kriki Member, Moderator Posts: 9,121
    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!


  • kine
    kine 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_1
    vaibhavgoel_1 Member Posts: 7
    You can use EVALUATE function