Use bitness-conditional code to change the representation of a number based on the bitness of TestStand. For example, if Locals.NumVal must be a pointer-sized number, use the following expression to set the representation appropriately based on the bitness of TestStand:

Locals.NumVal.Type.Representation = RunState.Engine.Is64Bit ? PropertyRepresentation_Int64 : PropertyRepresentation_Float64