k.sbs()

Read(110) Label: serial byte, byte,

Description:

Get an integer consisting of certain bytes of a serial byte key.

Syntax:

k.sbs(a:b,…)

Get the integer made up of bytes from the ath to the bth in serial byte key k

Note:

The function gets a certain byte a or certain bytes from a to b to form an integer.

Parameter:

k

A serial byte key

a

The ath byte of serial byte k; begin from the first byte when this parameter is absent

b

The bth byte of serial byte k; stop at the last byte when this parameter is absent, and get the ath byte only when :b is absent

Return value:

Integer

Example:

k(4,5,6,8).sbs(2)

5; get the second byte from serial byte key k(4,5,6,8) to generate an integer.

k(4,5,6,8).sbs(1:3)

263430; get the bytes from 1 to 3 from serial byte key k(4,5,6,8) to generate an integer.

k(4,5,6,8).sbs(2:)

329224; get bytes from the second to the end from serial byte key k(4,5,6,8) to generate an integer.

k(4,5,6,8).sbs(:4)

67438088; get byte from the second to the fourth from serial byte key k(4,5,6,8) to generate an integer.