It converts the first character of a string to an 8-bit ASCII integer extended to a longword.
1 – Input
The string expression.
2 – Output
The 8-bit ASCII integer.
3 – 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>