# 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://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/0%20\(52\).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://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/1%20\(53\).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://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/2%20\(53\).png)
