On Sat, Jul 24, 2010 at 1:54 PM, Trinh Ta <trinhta...@gmail.com> wrote:
> The 'value' attribute of <strcmp> can't be a string variable, can it ?
>
> The following:
> <assignstr assign_to="v1" value="blue"/>
> <assignstr assign_to="v2" value="blue"/>
> <log message="Comparing v1=[$v1] with v2=[$v2]"/>
> <strcmp assign_to="result" variable="v1" value="[$v2]"/>
> <log message="result=[$result]"/>
>
> will yield result=7.000000 and not 0 as expected.
>
> So how do I compare two string variables ?
>
It seems there is an undocumented attribute variable2. Try this:
<assignstr assign_to="v1" value="blue"/>
<assignstr assign_to="v2" value="blue"/>
<log message="Comparing v1=[$v1] with v2=[$v2]"/>
<strcmp assign_to="result" variable="v1" variable2="v2"/>
<log message="result=[$result]"/>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users