Description:
This method formats the field value as a signed decimal number. The field must be 64 bits or less in size. An error will be displayed if Decimal is used on fields greater than 64 bits in size.
Field values are inherently unsigned, so if there is a possibility that the field could have a negative value, you should use "RETRIEVE (SignExtension)" in addition to the Decimal format method. You can use this method to format a field value as an unsigned decimal number by not doing the RETRIEVE.
Parameters:
|
[optional] |
Str |
String to be appended after number |
|
Example:
FIELD signed_decimal (Fixed 2 Bytes) RETRIEVE (SignExtension 16) (Decimal) "Signed Decimal"
FIELD unsigned_decimal (Fixed 2 Bytes) (Decimal) "Unsigned Decimal"
For the value of 0xCAFE, signed decimal displays- 13570 while unsigned_decimal displays 51966.