k()

Read(504) Label: serial byte,

Description:

Generate a serial byte key having a specified number of bytes using a (long) integer.

Syntax:

k(ni:li,…)

Note:

The function generates a serial byte key having a specified number of bytes using a (long) integer ni. A serial byte key is an integer made up of byte values and can have a maximum length of 16 bytes. It is used to represent key values. Two serial byte keys with the same length are comparable, but can’t be computed.

Parameters:

ni

An integer or a long integer

li

The length of bytes with 1 being the default value; the max value is 16. If ni is a long integer ending with L, the parameter’s max value is 8

Return value:

A serial byte key

Example:

=k(1)

100000000000000; generate a serial byte key whose length is one byte from integer 1

=k(256:1)

0; generate a serial byte key whose length is 1 byte from integer 256; the result is wrong because 256 occupies more than one byte,

=k(256:2)

100000000000000; generate a serial byte key whose length is two bytes from integer 256

=k(1,2,3)

102030000000000

k(123456789L:2)

75bcd15