Sintaxe
M
BinaryFormat.Choice(binaryFormat as function, chooseFunction as function, optional type as nullable type, optional combineFunction as nullable function) as functionParâmetros
- binaryFormatfunctionObrigatório
Formato binário usado para ler o primeiro valor.
MBinaryFormat.Byte- chooseFunctionfunctionObrigatório
Função que recebe o primeiro valor e retorna o formato binário do segundo.
M(length) => BinaryFormat.List(BinaryFormat.Byte, length)- typenullable typeOpcional
Tipo do formato retornado pela função de escolha (
type any,type listoutype binary).- combineFunctionnullable functionOpcional
Função que combina o primeiro e o segundo valores no resultado final.
Retorna
functionExemplo
M
let
binaryData = #binary({2, 3, 4, 5}),
listFormat = BinaryFormat.Choice(
BinaryFormat.Byte,
(length) => BinaryFormat.List(BinaryFormat.Byte, length)
)
in
listFormat(binaryData)Resultado
M
{3, 4}Mais informações
- Subgrupo
- BinaryFormat