ASC
Format: var = ASC (string expr)
Supported by: COMX BASIC V1.00, Floating Point BASIC 2.2, Pecom 32 BASIC, Pecom 64 BASIC 1.0 and 4.0, Quest Super BASIC 1.4, 3.0, 5.0 and 6.0, RCA BASIC3 V1.1, Telmac SBASIC v 24.3
Similar commands: -
This function returns as its value the decimal equivalent of the ASCII value of the first character in the referenced string. The value returns in floating point as a default. If it has been preceded by any integer function it will be converted to integer. For example
A$(5) = "ARITHMETIC": B=ASC (A$(5))
The variable B would contain as its value, 65, the decimal ASCII value of the letter A.
As another example
5 A$="TEST" 10 FOR A = 1 TO LEN(A$) 20 PR ASC (MID$(A$,A)) 30 NEXT A
would result in
84
69
83
84