I offer the following up for conversation...
Code:
break on

iif( CompareVersions("10.0.1.123", ">", "10.0.1.123.1"), "True", "False")


function CompareVersions($version1, $comparison, $version2, optional $split)
dim $Ver1array, $Ver2array, $Ver1arrayCnt, $Ver2arrayCnt
dim $index, $maxindex

if VarTypeName($split) <> "String" $split = "." endif

$Ver1array = split($version1, $split)
$Ver1arrayCnt = ubound ($Ver1array)

$Ver2array = split($version2, $split)
$Ver2arrayCnt = ubound ($Ver2array)

Select
case $Ver1arrayCnt <= $Ver2arrayCnt
$maxindex = $Ver2arrayCnt
redim preserve $Ver1array[$maxindex]
case $Ver1arrayCnt > $Ver2arrayCnt
$maxindex = $Ver1arrayCnt
redim preserve $Ver2array[$maxindex]
case 1
;something is wrong
EndSelect

$CompareVersions = 1
for $index = 0 to $maxindex
dim $difference

$difference = val($Ver2array[$index]) - val($Ver1array[$index])

Select
case $comparison = "="
if $version1 <> $version2
$CompareVersions = 0
$index = 1+$maxindex
endif
case $comparison = "<"
if $difference < 0 or $version1 = $version2
$CompareVersions = 0
$index = 1+$maxindex
endif
case $comparison = ">"
if $difference > 0 or $version1 = $version2
$CompareVersions = 0
$index = 1+$maxindex
endif
Endselect
next
endfunction



[updated function]


Edited by Howard Bullock (2006-06-09 01:54 PM)
_________________________
Home page: http://www.kixhelp.com/hb/