LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String to Variant Problem in LV2011 ??

Hi All,

 

I am using LV2011 SP1 version and I am trying to perform a simple string to variant conversion using the "To Variant" function.

So for example if my string input is COM3 the output that I am getting as a variant is "COM3". So as you can see the conversion is not done properly because I am getting quotation marks for my string on my variant side.

My goal is to be able to convert the string COM3 to variant as COM3 without any additional signs.

 

Thank you Smiley Happy

0 Kudos
Message 1 of 4
(2,379 Views)

I assume you are referring to what is shown inside the Variant indicator, strings are displayed with enclosing quotes which are not part of the actual data.  If you convert the variant back to a string they will not be there.

0 Kudos
Message 2 of 4
(2,371 Views)

Yes I know that converting it back to string, quotation marks disapear. However is there a way to display the string without any quotation marks in the variant indicator alone.

 

Thanks,

0 Kudos
Message 3 of 4
(2,356 Views)

What's shown in the Variant is often pointless as you wont work with the variant, but you'll convert it back. What's the end goal?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 4
(2,355 Views)