Number (Output)

This object is used to format and display a numeric value based on a specified integer value. The VT uses the following equation to format the displayed value:

Displayed value = (Value attribute + Offset) × Scale factor.

Depending on the “Options” attribute, the displayed values are either truncated or rounded to the number of decimal places specified in the “Number of decimals” attribute. The VT should implement double-precision operations to minimise rounding errors.

Attributes

AID
Attribute
Description
Object Id

Unique identifier of the object. This must be unique within the object pool (2 bytes, 0-65534).

Type

The type of the object.

Width

Width of the object in pixels.

Height

Height of the object in pixels.

Background Colour

Background colour. A colour based on the index of the Colour Palette.

Font Attributes

Object Id of a Font Attributes object for display formatting of this field.

Options (Number Representation)

Logical bits indicating options. 1 = TRUE.

Logical bits indicating options. 1 = TRUE.

  • Bit 0 = Transparent: If TRUE, the input field is displayed with a transparent background instead of using the background colour attributes.
  • Bit 1 = Display leading zeros: If TRUE, the field is padded with zeros left-justified to the field width; justification is applied after padding with zeros.
  • Bit 2 = Display zero as blank: If TRUE, the field is displayed blank, but only if the displayed value of the object is exactly zero. Except when the field is blank, the VT must always display at least one digit before the decimal point (examples: “2.2”, “0.2”).
  • Bit 3 = Truncate: If TRUE, the value is truncated to the specified number of decimal places. Otherwise, the value is rounded to the specified number of decimal places.

Note for designers: When considering leading zeros and the field width, a leading minus sign (unary minus) should also be included.

Variable Reference

Reference to a Variable object from which the value is taken.

Offset

Offset applied to the value. Displayed value = (Value attribute + Offset) × Scale factor.

Scale

Scale to be applied to the input value as well as to the min/max values.

Number of decimals

Specifies the number of decimal places to be displayed after the decimal point.

Format (Number)

0 = Display in fixed decimal format (####.nn)
1 = Use of exponential format ([-]###.nnE[+/-]## where n is specified by the

Number of decimals attribute).

Justification

Horizontal/vertical alignment of the content.

Value (Integer)

Current integer value of the object if no variable reference is used.

Number of Macros to follow

Number of contained macro references, even if it is zero.

Each macro reference consists of 2 bytes: one for the event Id and one for the macro Id.

When the specified event occurs, the associated macro is executed. VT version 5 and later: A reference to a macro with a 16-bit Object Id counts as 2 macro references in the context of this attribute.