LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strings

Highlighted
sorry that i have another question

i have problems with comparing strings. i wanna check strings and i am
looking for
a sub_vi that returns false / true or if mutiple strings a number. i
tried it with a case
but it always choose the default case. whats wrong?

thanks for your help ...

cRayFiSh
0 Kudos
Message 1 of 3
(1,498 Views)
Highlighted
Hi,

I am not absolutely sure, how you want to compare strings/multiple
strings.

If you want to compare just two strings, it should be no problem
comparing them by connecting both strings to an 'Equal'. The output will
be a boolean.

If you want to compare multiple strings (lets say an array of strings)
with a 'reference string', than you can connect that array to the
'Equal' sign. The output will be an array of booleans showing which
element of the array equals your 'reference string'. The number of
matches then can be counted in an indexed for loop.

Hope I was clear enough,

Alexander Salim

P.S.: Don't needed a case?!?

-------------------------------

In article <38145597.B7CC6C76@fh-harz.de>,
dead.soul@gmx.de wrote:
> sorry that i have another question
>
> i
have problems with comparing strings. i wanna check strings and i am
> looking for
> a sub_vi that returns false / true or if mutiple strings a number. i
> tried it with a case
> but it always choose the default case. whats wrong?
>
> thanks for your help ...
>
> cRayFiSh
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 2 of 3
(1,498 Views)
Highlighted
You can also use the "scan string for tokens" or " match pattern" under
string functions. They don't return Boolean results but you can use the
"greater then 0" function on the "token index" or the "offset past match"
outputs.

Chuck Stewart

cRayFiSh wrote in message <38145597.B7CC6C76@fh-harz.de>...
>sorry that i have another question
>
>i have problems with comparing strings. i wanna check strings and i am
>looking for
>a sub_vi that returns false / true or if mutiple strings a number. i
>tried it with a case
>but it always choose the default case. whats wrong?
>
>thanks for your help ...
>
>cRayFiSh
>
0 Kudos
Message 3 of 3
(1,498 Views)