byteToNum

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the byteToNum of <byte>
byteToNum(<byte>)
Summary

Returns the numeric value of a byte.

Introduced4.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
byte

Any expression that evaluates to a byte. If you specify a string containing more than one byte, all bytes but the first are ignored.

Example
byteToNum(byte 1 of tString)
if byteToNum(nextByte) = 0 then next repeat
numToByte(byteToNum("Z")) -- returns Z
Values
NameTypeDescription
return

The byteToNum function returns an integer between zero and 255.

RelatedKeyword: integer
Function: md5Digest, charToNum, numToByte, numToChar
Control Structure: function
Description

Converts a single byte to a numeric value in the range 0-255

The byteToNum function is the inverse of the numToByte function.

Tagstext processing