ASC -- implied function
 
Syntax


In ARMbasic this is an automatic type conversion

But if you want to do it explicity, in your code add the following do-nothing #define

#define ASC(x)     x

Description


ARMbasic allows individual elements of a string to be accessed, and when they are assigned or compared to integer variable/constants, the ASCII value will be used.

Example

PRINT "the character represented by the ASCII code of 97 is:"; CHR(97)    ' will print   a

DIM astr(10) as string               ' examples of automatic type conversion complimentary to CHR

PRINT astr(0), chr(astr(0))                   ' will print    97     a
x = astr(0)
PRINT x                                        ' will print    97
if x = "a" then PRINT "it is a"          ' will print it is a
Differences from other BASICs

See also