Here’s how to use k1+k2 function for concatenating serial bytes.
Description:
Concatenate serial bytes.
Syntax:
k1+k2
Note:
Concatenate serial byte k1 and serial byte k2; both k1 and k2 must be serial bytes.
Parameters:
k1 |
A serial byte |
k2 |
A serial byte |
Return value:
A serial byte
Example:
k(1)+k(3:2) |
65539 |
|
|||
k(1:2)+k(1,3,4) |
16843524 |
|
|||
Serial bytes concatenation in a composite table: |
|
|
|||
|
|
A |
|
||
|
1 |
=create(k1,v1).record([k(1:3),10,k(2:3),20,k(3:3),30,k(4:3),40,k(10:3),100]) |
Create a table sequence where k1field is serial byte data |
||
|
2 |
=create(k1,k2,v2).record([k(1:3),k(1:2),"a",k(2:3),k(4:2),"c",k(2:3),k(8:2),"b"]) |
Create a table sequence where k1field and k2 filed are serial byte data |
||
|
3 |
=file("D:/ckv2.ctx") |
A composite table file |
||
|
4 |
=A3.create(#k1:3,v1) |
Create the composite table’s base table where k1 field is serial byte data |
||
|
5 |
=A4.attach(table2,#k2:2,v2) |
Add attached table table2 to the base table, where k2 field is serial byte data |
||
|
6 |
=A4.append(A1.cursor()) |
|
||
|
7 |
=A5.append(A2.cursor()) |
|
||
|
8 |
=A5.cursor(k1+k2).fetch() |
|
||