ascii
Returns an integer representation of the character.
Available in:
Apps (win) |
Apps (char) |
Reportwriter |
RPC |
Standalone PL |
X |
X |
X |
|
X |
Syntax
int ascii(character)
char character
Description
Returns ascii integer value of character.
character | specifies the char (alphanumeric or space) to process.
|
Example
Prints the ascii code for each character or space as given.
{
int i,len;
char s[80];
char ch;
s = "Hi my name is Bentley";
for (i=1;i<=length(s);i++) {
ch = substr(s,i,1);
printf("The ASCII value of '" ^^ ch ^^ "' is " ^^ ascii(ch));
}
}