03-02-2021 12:03 PM
@DavidBoyd wrote:
The other comment I really wanted to make: as a long-ago C programmer, I've always used LV's Scan From String and Format Into String nodes for their versatility and coherence with C stdlib's sscanf() and printf() and their ilk. That entire subpalette of Number/String Conversion one-off nodes is a no-go zone for me (20+ years of LV programming). Give me error terminals, offset past match, and growable inputs/outputs!
I actually find myself using the Number/String Conversion palette more and more over the years. This is pretty exclusive to when I only have 1 value. But I would say that I abuse the Scan From String and Format Into String nodes.
03-03-2021 03:53 AM
@DavidBoyd wrote:
That entire subpalette of Number/String Conversion one-off nodes is a no-go zone for me (20+ years of LV programming). Give me error terminals, offset past match, and growable inputs/outputs!
They have one big advantage: the work on arrays.
03-03-2021 10:43 AM
wiebe@CARYA wrote:
They have one big advantage: the work on arrays.
Subtle correction: "... most work on arrays" 😄
03-03-2021 11:06 AM
I totally missed the fact these nodes are polymorphic - for clusters, too! - and in both conversion directions. Thanks, Wiebe!
Interestingly, the default value input (to be returned for a scan failure) doesn't adapt to the datatype, so you only get one common default. But I suppose these nodes are really intended for bulk conversion of like elements anyway, so that's hardly a limitation.
I'll have to keep these nodes in mind next time I encounter a situation where bulk conversion is needed.
03-03-2021 11:12 AM
@DavidBoyd wrote:
I'll have to keep these nodes in mind next time I encounter a situation where bulk conversion is needed.
My most frequent use case is to display 2D numeric arrays in a table. One step! 😄