Char Function

The Char function returns the ASCII value specified by the corresponding character code. The optional second parameter allows the ASCII value to be repeated.

Syntax:

                    

Char(1,2)
1 = ASCII character code (can be a variable)
2 = Number of times to repeat the ASCII value

                

Example:

                    

%%[
set @char = Char(92,2)

]%%
Output: %%=v(@char)=%%

                

Output:

Output: \\

Explanation:

The Char function takes the character code 92 to determine the ASCII value to display. The ASCII value is repeated twice. Refer to the ASCII table below:

Leave a Reply

Your email address will not be published. Required fields are marked *