LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format string in Case structure for Scan From String function

took me a big switch in mindset to go from C/C# to LV. I think behind the scenes you can think of each value as a cluster (a struct)  that include type amoungst other things just some of these are amiguous until runtime hence situations like the one we have just been discussing.

 

Hope it helps, my take on things may be slightly off but its helped me get things straight

 

TDarkins 

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 11 of 12
(345 Views)

@ejkaiser wrote:

If this was the issue, Labview couldn't read strings from a text file and process them. In this case the string is also undefined at compile time.


This statement makes no sense to me, and I have no idea how it pertains to this. Look at it this way. Pretend you're sitting inside the Scan From String function. You're looking out from the format string spigot. You look up into the wire and try to follow it to see what value is on the wire. You keep following the wire until you hit... an output of a Select function. What's the data? You have no idea.

 

Look at it another way. What if one of the strings for the Select function said "%s" and the other said "%d". What should be the output of the Scan From String function? If anything, it would probably develop a case of schizophrenia. If we were running on quantum computers, there would be no issue since we could take Schrodinger's Cat principle, and the output would be both a string and a numeric, but not when you look at it.

0 Kudos
Message 12 of 12
(338 Views)