2.3 Extensions to Type Conversion and Testing

The following extensions to [ECMA-262/5] are necessary to support the SafeArray and VarDate extended types.

Conversion operation

Argument type

Operation

ToPrimitive

SafeArray

Returns the input argument (no conversion is applied).

ToPrimitive

VarDate

Returns the input argument (no conversion is applied).

ToBoolean

SafeArray

Returns a value of false.

ToBoolean

VarDate

Returns a value of false.

ToNumber

SafeArray

Throws a TypeError exception.

ToNumber

VarDate

Returns the Number value that represents the internal numerical value of the VT_Date value.

ToString

SafeArray

Applies the following steps:

Let objValue be ToObject(input argument).

Returns the value of ToString(objValue).

ToString

VarDate

Returns a String value that contains a representation of the VarDate value in the same representational format as Date.prototype.toString.

For more information, see[ECMA-262/5], Section 15.9.5.2.

ToObject

SafeArray

Creates a new VBArray object in the same manner as the following ECMAScript expression:

new VBArray(argument)

In this case, argument is a value of type SafeArray.

ToObject

VarDate

Throws a TypeError exception.

CheckObjectCoercible

SafeArray

Returns with no return value.

CheckObjectCoercible

VarDate

Throws a TypeError exception.