LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
e3tech

Spreadsheet String To Array Function failure indicator

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

Please add the number of characters processed to be used as a failure indicator.  This function transforms "1.1.1" into 1.1 and there is no way to tell whether anything was lost.

7 Comments
RavensFan
Knight of NI

Please provide more information on what you are trying to do.  Perhaps even attach a VI.

 

While you may have a perfectly valid idea to be incorporated into LabVIEW, my feeling is that you are making some simple mistake in your code.  Without a good example of what you are doing and why you need this feature added, you'll have a hard time selling your idea and getting people to vote for it.

altenbach
Knight of NI

@e3tech wrote:

Please add the number of characters processed to be used as a failure indicator.  This function transforms "1.1.1" into 1.1 and there is no way to tell whether anything was lost.


If you want to retain it as string "1.1.1" in a string array output, you simply need to wire a string array to the array type input. If you are converting to a numeric array, 1.1.1 is not a valid formatted string and LabVIEW will stop parsing once the valid data ends. It ends after "1.1". This behavior is normal and common to all scanning function. No action needed.

e3tech
Member

Imagine you have a sequence of strings and you need to tell how many of them can be interpreted as valid arrays of numbers (where the value separator is fixed up front).  In particular, "1.1.1" should count as invalid, not as ([1.1]).  How do you proceed about that?  Of course, you can evaluate it by repeatedly calling Scan From String for each string but I am trying to convince you that returning the number of characters processed from Spreadsheet String To Array would make the function more sound and versatile.  The function is closed so I cannot tell you what you need to change inside but returning the length of the longest valid prefix would make it.  BTW, this is what Scan From String does, in a way, apart from returning an error.

AristosQueue (NI)
NI Employee (retired)

e3tech: would it suffice to have a "remaining string" output like Scan From String? If we added functionality like this, it seems to me that we would want to follow the same paradigm as our existing functions.

e3tech
Member

Certainly, the developer can be sure that everything has been consumed if the remaining string is empty.

AristosQueue (NI)
NI Employee (retired)

I'm going to flag this idea to the developer who owns that feature. It hasn't changed in many years, and this idea is unlikely to get enough kudos to trigger a general LV review, but for people using that primitive, this is a good idea. The prim is likely to get a review two years from now... this will be on the list of things to consider. No promises. Thanks for submitting it.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.