LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert "True" string to boolean

Solved!
Go to solution

muks wrote:

 


Haha muks- isn't LabVIEW great; it tempts you to overcomplicate things!!

 

 

Absolutely............... :smileyvery-happy:


"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." 

Quote from Albert Einstein



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 11 of 17
(4,507 Views)
Opposite direction can also mean you dont have the required thing to face the complex things
0 Kudos
Message 12 of 17
(4,498 Views)

Another way.

Message Edited by Ravens Fan on 08-06-2009 10:55 PM
Message 13 of 17
(4,460 Views)
Solution
Accepted by Chris_Cilino

Scan From String

Message 14 of 17
(3,647 Views)

Very nice tight code for string literal "TRUE/FALSE" to boolean conversion. Who would've thought of it that a Scan from String function does this instead of the Type Cast function?

 

Using a Type Cast function with a Boolean constant results in all TRUE or all FALSEUsing a Type Cast function with a Boolean constant results in all TRUE or all FALSE

 

Using a Scan from String with a Boolean Type input results in correct conversionUsing a Scan from String with a Boolean Type input results in correct conversion

0 Kudos
Message 15 of 17
(2,597 Views)

Hi Relativity,

 


@Relativity wrote:

Who would've thought of it that a Scan from String function does this instead of the Type Cast function?


Anybody who has read the LabVIEW help for FormatIntoString, ScanFromString and TypeCast would have known this difference…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 17
(2,574 Views)

Well, DUH!

 

But even your answer wasn't the best or tightest code GerdW. Keep reading 'em LV Help files! 😉

0 Kudos
Message 17 of 17
(2,547 Views)