Representing Pointer-Sized Numbers in Sequences in 32-bit TestStand and 64-bit TestStand
- Updated2025-07-23
- 2 minute(s) read
Avoid using pointer-sized integers in sequences because no equivalent TestStand numeric data type exists. An example of a pointer-sized integer is the size_t type in C/C++, which is the size of a pointer but is intended to be used as a true integer data type.
The TestStand Number data type supports the following representations:
- 64-bit double-precision, floating-point (default representation)
- 64-bit signed integer
- 64-bit unsigned integer
Use the default 64-bit double-precision, floating-point representation to store signed and unsigned 32-bit integers because the 64-bit double-precision, floating-point representation can represent all possible 32-bit integer values. For 32-bit integers, the default 64-bit double-precision, floating-point representation is more appropriate than using the 64-bit signed or unsigned integer representations because TestStand supports automatic conversion between the default representation and 32-bit integer types in module adapter steps. A 64-bit double-precision, floating-point representation cannot exactly represent all possible 64-bit integer values, so TestStand does not allow automatic conversion between Numbers with the 64-bit double-precision, floating-point representation and 64-bit integer data types.
If no workaround exists to using pointer-sized integers in TestStand, use one of the following strategies:
- Use an Object Reference data type to store the number as a pointer.
- Use a TestStand Number data type with representation based on bitness.
- Use two separate variables.
Related Information
- Using an Object Reference to Represent Pointer-Sized Numbers in Sequences in 32-bit TestStand and 64-bit TestStand
- Using a TestStand Number with Representation Based on Bitness to Represent Pointer-Sized Numbers in Sequences in 32-bit TestStand and 64-bit TestStand
- Using Two Separate Variables to Represent Pointer-Sized Numbers in Sequences in 32-bit TestStand and 64-bit TestStand