asc()

Function groupExecute on clientPlatform(s)
StringNOAll

Syntax

asc(string,position)

Description

Returns the Unicode value of the character at the position in the string. The first position in the string is 1.

The value returned is -1 if position is less than 1 or greater than the length of string.

Example

Calculate
 
lResult
 as 
asc
(
'Quantity'
,1)

# returns 81, that is the ASCII value of the 1st character Q

 
Calculate
 
lResult
 as 
asc
(
'Car'
,3)

# returns 114, that is the ASCII value of the 3rd character r

 
Calculate
 
lResult
 as 
asc
(
'Train'
,9)

# returns -1 because 9 is greater than the length of the string