Altair® Monarch®


Asc Function


The Asc function returns the numeric value of a character.

Note: If you pass a string of more than one character to this function, the function will return the value of only the first character of the string.




String can be a constant, a character field, or an expression that results in a single character or a function that returns a single character.

Return value

This function returns a number in the range 0-255.

Calculated field example

If the Amount field contains the values 876.00 and  ¥1022 (indicating an amount in Japanese yen), the following calculated field expression would return the string Dollars or Yen: If(Asc(Amount)=165,"Yen","Dollars").

The first part of this expression, If(Asc(Amount)=165, determines whether or not the Yen symbol (character code 165) appears at the beginning of the Amount field. If it does, the first value, Yen, is returned; otherwise the second value, Dollars, is returned.

Filter/Find example

Records with an Amount field value beginning with the Japanese yen symbol (¥) can be selected or found using the expression: Asc(Amount)=165.