CharA
PowerScript function
Description
Extracts the first ASCII character of a string or converts an
integer to a char.
Syntax
|
1 |
CharA ( n ) |
|
Argument |
Description |
|---|---|
|
n |
A string that begins with the character you want, an |
Return value
Char.
Returns the first character of n. If n is null, CharA returns
null.
Examples
This example sets ls_S to an asterisk, the character corresponding
to the ASCII value 42:
|
1 2 |
string ls_S ls_S = CharA(42) |
These statements generate delivery codes A to F for the values 1
through 6 of li_DeliveryNbr:
|
1 2 3 4 5 6 7 |
string ls_Delivery integer li_DeliveryNbr FOR li_DeliveryNbr = 1 to 6 ls_Delivery = CharA(64 + li_DeliveryNbr) ... // Additional processing of ls_Delivery NEXT |
See also
Char method for DataWindows in the section called “Char” in DataWindow Reference.