forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbyteToNum.lcdoc
More file actions
45 lines (28 loc) · 927 Bytes
/
byteToNum.lcdoc
File metadata and controls
45 lines (28 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Name: byteToNum
Type: function
Syntax: the byteToNum of <byte>
Syntax: byteToNum(<byte>)
Summary:
Returns the numeric value of a byte.
Introduced: 4.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
byteToNum(byte 1 of tString)
Example:
if byteToNum(nextByte) = 0 then next repeat
Example:
numToByte(byteToNum("Z")) -- returns Z
Parameters:
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.
Returns:
The <byteToNum> <function> returns an <integer> between zero and 255.
Description:
Converts a single byte to a numeric value in the range 0-255
The <byteToNum> function is the inverse of the <numToByte> function.
References: function (control structure), md5Digest (function),
charToNum (function), numToByte (function), numToChar (function),
integer (keyword)
Tags: text processing