Clib Convert Character to ASCII Method

The Clib Convert Character to ASCII method clears every bit of the value that the char argument contains except for the seven least significant bits. The result is a seven-bit C representation of the character. It returns this value as a seven-bit ASCII representation.

If the value you specify in the char argument is already a seven-bit ASCII character, then it does not clear any bits and returns the character.

Format

Clib.toascii(char)

The arguments for this method are the same as the arguments for the Clib Is Alphabetic method. For more information, see Clib Is Alphabetic Method.

Example

The following example returns the close parenthesis character:

TheApplication().RaiseErrorText(Clib.toascii("©"));

Related Topics

For more information, see Clib Is ASCII Method.