NAME

chrasc - convert ASCII characters

SYNOPSIS

#include <basic/string.h>

short asc(s)
struct string *s;

struct string chrS(i)
short i;

DESCRIPTION

Asc returns as an integer the first character of the string pointed to by s.  This function implements the BASIC ASC function. 

ChrS returns a string the only character of which has the value of the integer i.  This function implements the BASIC CHR$ function. 

These routines perform no real conversion between the integers and characters.  The characters are regarded as one byte numeric values.  If one regards the characters as ASCII symbols, then a mapping occurs between the symbol and its code number. 

SEE ALSO

string(inc)
asc(func), chr$(func)

DIAGNOSTICS

Asc generates error 5 (Illegal function call) if the string pointed to by s is empty. 

ChrS generates error 5 (Illegal function call) if i is negative or greater than 255. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber