DTRHELP.HLB  —  Functions  FN$ICHAR  Example
       DTR> DECLARE VAR PIC X(80) .;
       DTR> DECLARE CH PIC X . ;
       DTR> DECLARE I INTEGER .;
       DTR> VAR = "GRZ-ALE" ;
       DTR> i = 1 ;
       DTR> REPEAT FN$STR_LENGTH( VAR || "" )
       CON>         BEGIN
       CON>         CH = FN$STR_EXTRACT(VAR, i, 1 );
       CON>         PRINT CH("CHARACTER"), FN$ICHAR(CH)("CODE");
       CON>         I = I+1 ;
       CON>         END ;

       CHARACTER    CODE

           G              71
           R              82
           Z              90
           -              45
           A              65
           L              76
           E              69

       DTR>
Close Help