# Asc (String)

| **Name**    | ***Asc***                                                                                                                                 |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax      | Asc (String str)                                                                                                                          |
| Purpose     | To return the ASCII value of a specified character.                                                                                       |
| Description | Returns ASCII value of the specified character.                                                                                           |
| Return Type | Int32                                                                                                                                     |
| Parameters  | <p>str \[System.String] – Character for ASCII value</p><p>index \[System.Int32] – Position of character to be converted within string</p> |

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fvwof78MbxTHaUD6jSEeT%2F0.png?alt=media)

**Example**

In this example, we are passing the required parameter to the function transformation object using a *Variables* object.

Where,

*str* = ABC-123

*index* = 3

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FiTPVq4yXoCC4fvjmo7qM%2F1.png?alt=media)

Right-click on the function transformation object and select *Preview Output.* You can see that Astera Data Stack has returned an integer ASCII value of the specified character in a string.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FI1BNknpslbaxZ17pihi1%2F2.png?alt=media)
