[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CHR                    Return Character from Ordinal                 pp 142

 Syntax:  Chr (NumVar) ;

 Type:    String, Char

 Form:    Function

 Purpose: Returns ASCII character of numeric argument.

 Notes:   CHR is invalid when declaring set constants and results in
          compiler Error 41.  Use the pound sign (#) with the ordinal of
          the desired character.  Especially useful for the line drawing
          characters.


 ----------------------------------------------------------------------------



 Usage:
       CONST
          WhiteSpace : Set of Char = [Chr(7),Chr(10),      { Error 41 }
                                      Chr(13),Chr(32)];
          WhiteSpace : Set of Char = [#8,#10,#12,#13,#32];

       VAR
          StrVar : String [1]    ;
          NumVar : Integer       ;

       BEGIN
          StrVar := Chr (NumVar) ;
          StrVar := Chr ($41)    ;
       END.

See Also: Byte Char Ord
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson