2.5.6.3 vDouble

The vDouble custom input type specifies a vNum custom token grouping derived from a source token that MUST be a vNumAny custom token grouping or a PtgString, or PtgCy parse token. It contains the following computed properties.

Value: This property specifies the Value of a numeric value or date value, derived from the source token Value as follows.

If the source token is a PtgDate parse token, the Value is equal to the source token Value.

If the source token Value can be converted to a double, as described in [MSDN-ToDouble], the Value is the result of the conversion.

If the source token is a PtgString containing a numeric value, or the concatenation of a numeric value and a unit and the numeric value can be converted to a double, as described in [MSDN-ToDouble], the Value is the result of the conversion.

If the source token Value is equal to TRUE (case insensitive), the Value is equal to one. If the source token Value is equal to FALSE (case insensitive), the Value is equal to zero.

In all other cases, the input argument is not valid.

Unit: This property specifies the Unit of the numeric value or date value. If the source token is a vUnitType, the Unit is equal to the Unit of the source token. If the source token is a PtgString containing the concatenation of a numeric value and a unit, the Unit is equal to the unit derived from the PtgString. Otherwise, the numeric value does not have a Unit.

Dimension: This property specifies the Dimension of the numeric value or date value. If the source token type is a PtgNumMultiDim parse token, the Dimension is equal to the dimension of the source token. If the source token is a PtgAcre or PtgHectare parse token, the Dimension is equal to two. If the source token is any other vUnitType custom token grouping, the Dimension is equal to one. Otherwise, Dimension is equal to zero.