As discussed briefly here, the Type Cast function has a seemingly unecessary limitation that it does not accept arrays with more than one dimension.
Obviously, such arrays cannot be valid inputs for the "type" terminal (and thus the output), because of ambiguity (For example if we have a8 elements, LabVIEW would not know if we want a 1x8, 2x4, 4x2, or 8x1 2D array). However, having a multidimensional array as input does not pose any such problems and the result can be fully predicted. If such arrays are allowed as input, we could do cool things very quickly and with very little code:
Some examples (currently not possible! :()
- Type Cast a 2x2 2D U8 array to a SGL or I32 scalar, for example.
- Type Cast a 4x4 2D DBL array to a 1D CDB array of lenght 8.
- Reshape a 3D DBL array to a 1D DBL array containing all elements (see image below for what we need to do today instead)
IDEA: The input of Type Cast should accept almost anything. In particular, numeric arrays with more than one dimension should be allowed and simply interpreted in memory order.
(Of couse certain things should probably remain disallowed as inputs, such as arrays of strings, for example.)