Skip to main content

Binary.Range

ส่งกลับชุดย่อยของค่าไบนารีที่เริ่มต้นที่ออฟเซต

Syntax​

Binary.Range(
binary as binary,
offset as number,
optional count as number
) as binary

Remarks​

ส่งกลับชุดย่อยของค่าไบนารีที่เริ่มต้นที่ออฟเซต binary พารามิเตอร์ offset ที่เลือกได้จะกำหนดความยาวสูงสุดของชุดย่อย

Examples​

Example #1​

ส่งกลับชุดย่อยของค่าไบนารีที่เริ่มต้นที่ออฟเซต 6

Binary.Range(#binary({0..10}), 6)

Result:

#binary({6, 7, 8, 9, 10})

Example #2​

ส่งกลับชุดย่อยของความยาว 2 จากออฟเซต 6 ของค่าไบนารี

Binary.Range(#binary({0..10}), 6, 2)

Result:

#binary({6, 7})

Category​

Binary