Home  Contents

mtd16.answerCode

Mtd16 Core4 Lua Commands

SYNOPSIS

ans = mtd16.answerCode(tag)

DESCRIPTION

Converts the type of tag, which must be Message, into the type Answer. This is done by replacing the top four bytes of the tag's numeric value.

RETURN VALUE

If tag is of type Message, the numeric value of the corresponding Answer tag.

ERRORS

Returns nil if tag does not describe a tag of type Message.

Raises an error if tag could not be converted to a number by looking it up in mtd16.lutTag.

EXAMPLE

>  > 
ans = mtd16.answerCode(0xD00F) print(string.format("0x%04X", ans))
0xE00F

SEE ALSO