User Tools

Site Tools




Return ASCII code of the first character in the given String.

Dim ST1 AS String * 12
Dim i AS Integer
ST1 = "123"
i = Asc(ST1)             ' &H31 is stored in variable I.  ASCII code of 1 is &H31 or 0x31.

Caution: A variable must be used when using string functions.

Debug Left("INTEGER",4)  ' A String constant cannot be used.
Debug Left(ST1,4)        ' The String must be stored as a variable first.

See also Chr.

Go CUBLOC home

cubloc/asc/index.txt · Last modified: 2016/06/03 09:09 by COMFILE Technology