Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

Chr

  • Last UpdatedJul 18, 2023
  • 1 minute read

Converts a number into its string character ASCII code value.

The Chr function expects the argument Num to be a valid numeric integer (whole positive number within the range 0 to 255 inclusive). If Chrcontains no number, a runtime error occurs.

Note: Values 8, 9, 10, and 13 convert to backspace, tab, linefeed, and carriage return characters respectively.

The Chr function performs the opposite of the Asc function, which converts a text string character to it's numeric ASCII code value.

Syntax

Chr(Num)

Num:

An integer or expression representing a valid numeric value.

Return Value

Returns a single character string representing the ASCII character code value of the number Num provided in the argument.

Asc

Example

Dim vntVar ' declare result holder variable
vntVar = Chr(65) ' returns "A"
vntVar = Chr(97) ' returns "a"
vntVar = Chr(90) ' returns "Z"
vntVar = Chr(122) ' returns "z"

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in