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

AVEVA™ Plant SCADA

Asc

  • Last UpdatedJul 18, 2023
  • 1 minute read

Converts a text string character to its numeric ASCII code value. The Asc function expects the argument Str to be a valid string expression. If Str contains no characters, a runtime error occurs. The Asc function performs the opposite of the Chr function, which converts a number into its string character ASCII code value.

Syntax

Asc(Str)

Str:

A string or expression that can represent a valid text value.

Return Value

Returns the numeric ASCII code value of the first character in Str provided in the argument.

Chr

Example

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

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