@@ -28,28 +28,10 @@ charToNum(binaryEncode("B*","01111111")) -- returns 127
2828Parameters:
2929formatsList:
3030The <formatsList> consists of one or more dataTypes, each followed
31- optionally by an amount. A dataType is one of the following single
32- letters: x: output amount null characters
31+ optionally by an amount.
3332
34- dataStringList (string):
35- A comma-separated list of dataStrings. Each dataString is a string, or
36- an expression that evaluates to a string.
37-
38- amount (enum):
39-
40- - If the dataType is a, A, b, B, h, or H, the amount specifies the
41- number of characters or groups of the dataString to use; extra
42- characters are ignored. The * character Encodes the rest of the data
43- in the current dataString. If no amount is specified, the dataType is
44- used for one character.
45- - If the dataType is c, C, s, S, i, I, n, N, m, M, f, or d, the amount
46- specifies the number of dataStrings to encode. The * character
47- Encodes the rest of the dataStrings. If no amount is specified, the
48- dataType is used for one dataString.
49- - If the dataType is x, the amount specifies how many nulls to place in
50- the returned value.
33+ A dataType is one of the following letters:
5134
52- One of the following items:
5335- c: encode amount numbers as signed 1-byte integers
5436- C: encode amount numbers as unsigned 1-byte integers
5537- s: encode amount numbers as signed 2-byte integers in host byte order
@@ -62,9 +44,26 @@ One of the following items:
6244- M: encode amount numbers as unsigned 4-byte integers in network byte order
6345- f: encode amount numbers as single-precision floating-point numbers
6446- d: encode amount numbers as double-precision floating-point numbers
65-
66- The amount corresponding to each dataType is an integer or the * character:
47+ - x: encode amount null characters
6748
49+ The amount is an integer or * and specifies the encoding in the
50+ following way:
51+
52+ - If the dataType is a, A, b, B, h, or H, the amount specifies the
53+ number of characters or groups of the dataString to use; extra
54+ characters are ignored. The * character Encodes the rest of the data
55+ in the current dataString. If no amount is specified, the dataType is
56+ used for one character.
57+ - If the dataType is c, C, s, S, i, I, n, N, m, M, f, or d, the amount
58+ specifies the number of dataStrings to encode. The * character
59+ Encodes the rest of the dataStrings. If no amount is specified, the
60+ dataType is used for one dataString.
61+ - If the dataType is x, the amount specifies how many nulls to place in
62+ the returned value.
63+
64+ dataStringList (string):
65+ A comma-separated list of dataStrings. Each dataString is a string, or
66+ an expression that evaluates to a string.
6867
6968Returns:
7069The <binaryEncode> <function> <return|returns> the binary string
0 commit comments