Numeric Parameters - .NET Call Parameters

Numeric Parameters

The .NET Adapter supports most of the .NET numeric data types. However, TestStand does not natively support the System.Decimal data type and instead converts it to a double-precision, floating-point number if you store it in a TestStand number variable. This can result in a loss of precision because the System.Decimal data type can store numbers with a higher precision than the double-precision, floating-point data type. You can, however, store System.Decimal data type values in TestStand object reference variables that store the .NET value directly and thus preserve the precision, but you cannot then access the value in TestStand directly.

Enumeration Parameters

Use the ring control in the Value column of the Parameters Table on the .NET Module tab of the Step Settings pane in the TestStand Sequence Editor or on the Module tab of the Edit .NET Call dialog box in a TestStand User Interface to select one of the enumeration values or enter an expression that evaluates to a number, a string that corresponds to the enumeration value, or a compatible TestStand enumeration data type.

To pass an enumeration parameter to a .NET code module using a number, specify a TestStand expression that evaluates to a number. The number must have a numeric representation compatible with the .NET integer type: unsigned 64-bit integer for ulong , signed 64-bit integer for long , or the default representation float 64 .

To pass an enumeration parameter using a string, specify a TestStand expression that evaluates to a string for the value parameter. When the .NET Adapter enumeration uses the Flags attribute, you can pass multiple values of the bit field by separating each element in a string, such as "enum 1, enum2" .

To pass an enumeration parameter using the TestStand enumeration data type, specify a TestStand expression that evaluates to an enumeration that is compatible with the underlying .NET enum. To be compatible, the TestStand type and underlying .NET type must have identical sets of enumerators. Both types must have the same number of enumerators matching in both name and numeric value, as well as compatible numeric representations. The order in which the enumerators are defined does not matter.

See Also

Edit .NET Call dialog box

Mapping Parameters

Step Settings Pane