13.08.2013 Aufrufe

opsi-winst Handbuch

opsi-winst Handbuch

opsi-winst Handbuch

MEHR ANZEIGEN
WENIGER ANZEIGEN

Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.

YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.

<strong>opsi</strong>-<strong>winst</strong> <strong>Handbuch</strong><br />

comment: passed<br />

comment: 1.2.3.4.5 is lower then 1.2.13.4.5<br />

Else<br />

EndIf<br />

23 / 93<br />

• CompareDotSeparatedStrings (, )<br />

vergleicht zwei Strings vom Typ .[.[.]] und liefert "0" bei Gleichheit, "1" wenn<br />

string1 größer ist und "-1" wenn string1 kleiner ist. Der Vergleich ist nicht Case sensitive.<br />

Beispiel:<br />

Der Code:<br />

comment "Testing: "<br />

message "CompareDotSeparatedStrings"<br />

set $string1$ = "1.a.b.c.3"<br />

set $string2$ = "1.a.b.c.3"<br />

set $ConstTest$ = "0"<br />

set $CompValue$ = CompareDotSeparatedStrings($string1$, $string2$)<br />

if ($ConstTest$ = $CompValue$)<br />

comment "passed"<br />

comment $string1$+" is equal to "+$string2$<br />

else<br />

set $TestResult$ = "not o.k."<br />

LogWarning "failed"<br />

endif<br />

set $string1$ = "1.a.b.c.3"<br />

set $string2$ = "1.A.B.C.3"<br />

set $ConstTest$ = "0"<br />

set $CompValue$ = CompareDotSeparatedStrings($string1$, $string2$)<br />

if ($ConstTest$ = $CompValue$)<br />

comment "passed"<br />

comment $string1$+" is equal to "+$string2$<br />

else<br />

set $TestResult$ = "not o.k."<br />

LogWarning "failed"<br />

endif<br />

set $string1$ = "1.a.cb.c.3"<br />

set $string2$ = "1.a.b.c.3"<br />

set $ConstTest$ = "1"<br />

set $CompValue$ = CompareDotSeparatedStrings($string1$, $string2$)<br />

if ($ConstTest$ = $CompValue$)<br />

comment "passed"<br />

comment $string1$+" is higher then "+$string2$<br />

else<br />

set $TestResult$ = "not o.k."<br />

LogWarning "failed"<br />

endif<br />

set $string1$ = "1.a.ab.c.3"<br />

set $string2$ = "1.a.b.c.3"<br />

set $ConstTest$ = "-1"<br />

set $CompValue$ = CompareDotSeparatedStrings($string1$, $string2$)<br />

if ($ConstTest$ = $CompValue$)

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!