← Documentation Home

Asc

Category: Strings

Back to System Functions


Signature

Asc(text As String, offset As Integer)

Returns

Integer

Description

Returns the ordinal byte value of the character at a 1-based offset in text.

The result is in the range 0 through 255. Returns -1 when offset is less than 1 or beyond the end of the string.

Example

value = Asc("LunarBasic", 6) ' 66 for "B"