Chr - Convert an ANSI character code to a character

Return to Introduction  Previous page  Next page

$character = Chr(charcode)



is the ANSI character represented by the character code: charcode.


is an ANSI character code.

charcode may be a variable.

The Chr command converts an ANSI character code to a character. For example, Chr(10) returns a line feed character.  You can use Chr(10) to format multiple lines in a message box.


$TAB = Chr(9)

$LINEFEED = Chr(10)

MsgBox("Line 1" & Chr(10) & "Line 2")


See Also:


Script Command Summary

Script Variables

Using the Scripting Language

TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.