LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BUG: "File/Directory Info" size parameter too small

You know, I was thinking about this late yesterday and this morning, and I wondered: In the case of that function, along with the Split Number function, is it that the output is polymorphic, or is LabVIEW simply placing an instance of the function that matches the datatype input? We all know that many of the functions in LabVIEW are polymorphic, but we don't say the output is polymorphic. We say the function itself that is polymorphic. I'm curious as to how NI implements this function internally.

I'm not trying to split hairs here, just wondering aloud about what it means to be polymorphic. I've always hoped that NI would eventually get around to providing a true polymorphic control, rather than having to deal with the clumsy method we have to create polymorphic VIs, and using a variant as a "polymorphic" control is a poor substitute.
0 Kudos
Message 11 of 14
(678 Views)


smercurio_fc wrote:
You know, I was thinking about this late yesterday and this morning, and I wondered: In the case of that function, along with the Split Number function, is it that the output is polymorphic, or is LabVIEW simply placing an instance of the function that matches the datatype input? We all know that many of the functions in LabVIEW are polymorphic, but we don't say the output is polymorphic. We say the function itself that is polymorphic. I'm curious as to how NI implements this function internally.

While inputs are polymorphic, outputs typically "adapt to the input type". In the case of split numbers, the input is polymorphic and can be any integer type. However, once you wire a specific input, the outputs adapt accordingly.
 
For the example of "split number".
  • Wire a U16 and you get two U8, wire a U64 and you'll get two U32, etc.
    Wire an array of U32, and you'll get two arrays of U16
  • Wire a cluster of an U32 and an U16 and you'll get two clusters of an U16 and an U8.
  • Wire an array of such clusters, ....

....you get the picture :))

0 Kudos
Message 12 of 14
(665 Views)
No, I understand, and know about the behavior of the functions, which is what led to my curiosity. After Wiebe pointed out the Variant to Data function I thought about other functions, and whether the outputs are really "polymorphic" or whether the mechanism that's going on is something else. I'm not sure I could convince someone that "adapt to the input type" isn't the same as "polymorphic" in the general sense, though.

Didn't mean to hijack this thread on a somewhat academic issue.


Message Edited by smercurio_fc on 03-05-2008 11:51 AM
0 Kudos
Message 13 of 14
(657 Views)
What about the new version of "Read From Spreadsheet.vi" that now ships with LV?
 
You can select the flavor you want or in the case of the "write to..." it will adapt to the data type you wire up.
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 14
(652 Views)