# 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://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/91oHtUgL0e89uHQIgZ7P/0.png)

**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://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/17lRW0mLPK7NNAwwHZnr/1.png)

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://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/GcD7gPKRHm7PIi7vkqol/2.png)
