PreviousNextIndex

CHR function

Converts an integer value to its corresponding character value.

Syntax

CHR ( expression  
      [ , target-codepage [ , source-codepage ] ] 
    ) 

expression
target-codepage
source-codepage
Example

The r-chr.p procedure initializes the 26 elements of the letter array to the letters A through Z.

r-chr.p
DEFINE VARIABLE ix     AS INTEGER   NO-UNDO. 
DEFINE VARIABLE letter AS CHARACTER NO-UNDO FORMAT "X(1)" EXTENT 26. 
DO ix = 1 TO 26: 
  letter[ix] = CHR((ASC("A")) - 1 + ix). 
END. 
DISPLAY SKIP(1) letter WITH 2 COLUMNS NO-LABELS 
  TITLE "T H E  A L P H A B E T". 

Notes
See also

ASC function, CODEPAGE-CONVERT function, SESSION system handle, STRING function


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex