Name
ByteAsc -- get single byte from string (V7.1)
Synopsis
v = ByteAsc(string$[, pos])
Function
Returns the value of the byte at the string index specified by pos. The return value v will be in the range of 0 to 255.

Since Hollywood strings cannot only contain text but also raw binary data, this function is suitable for accessing raw string bytes at specified indices. The normal Asc() function, on the other hand, is more appropriate for dealing with text strings because it operates in Unicode mode by default which means that the input string must be in valid UTF-8.

Inputs
string$
input string
pos
optional: index of byte to return (defaults to 0)
Results
v
string byte at specified index

Show TOC