StrComp - function of language VBScript

Returns a value indicating the result of a string comparison.

For the purposes of the PROMOTIC system, it is more usefull to use the method: Pm.StringCmp.

Integer StrComp(String string1, String string2, [Integer compare])
n = StrComp(string1, string2[, compare])
string1(String) Text string
string2(String) Text string
compare[optional] (Integer) Numeric value indicating the kind of comparison to use when evaluating strings. If not set, then a binary comparison is performed.
vbBinaryCompare - perform a binary comparison
vbTextCompare - perform a textual comparison
Return Values:
-1 - string1 is less than string2
0 - string1 is equal to string2
1 - string1 is greater than string2
VBScriptSelect and copy to clipboard

Dim sStr1, sStr2, nComp
sStr1 = "ABCD"
sStr2 = "abcd"
nComp = StrComp(sStr1, sStr2, 1)  'Returns 0
nComp = StrComp(sStr1, sStr2, 0)  'Returns -1
nComp = StrComp(sStr2, sStr1)  'Returns 1
PROMOTIC 9.0.6 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice