AscB

Function that returns the byte code which represents a specific character. The AscB function is used with byte data contained in a string. Instead of returning the character code for the first character, AscB returns the first byte.
For Western languages 1 byte = 1 character but many Eastern languages use double-byte/Unicode characters.

AscW is provided for platforms that use Unicode characters. It returns the Unicode (wide) character code, thereby avoiding the conversion from Unicode to ANSI.

Syntax
      Ascb (string)

Ascb ("A") will return 65

Examples

Dim intDemo

intDemo = AscB ("A")
MsgBox intDemo
> 65

intDemo = AscB ("ABC")
MsgBox intDemo
> 65

“I've nothing much to offer, There's nothing much to take, I'm an absolute beginner” ~ David Bowie

Related:

Asc(String) - Return ASCII code for string
AscW(String) - Return Unicode code for string
Int - Return the integer portion of a number


Copyright © SS64.com 1999-2019
Some rights reserved