type cast 类型转换
·比如整型 (int) 到字符串 (string)就是一种类型转换,但是一般的类型转换都有专用的节点包,比如 Functions -> String -> Conversion 下的字符串转换。
·我个人认为 type cast 主要是用于 variant 和其他类型的转换。
Variant (和其他高级语言中的泛型类似),它可以代表任何类型,因为它把数据和类型描述信息分开。看看 NI 官方的表述:
A "Variant" is essentially a universal data type. It can contain any kind of information internally (i.e., it can represent any data type), along with some information about what data type the information belongs to; it is a general purpose, package data type. Think of a Variant as something that can represent every possible data type, but it separates the data itself the type information into individual pieces of the "package".