andyswarbs Posted February 11, 2006 Share Posted February 11, 2006 expandcollapse popup; _IsVer1GEVer2 Returns true if $ver1 is greater than or equal to $ver2. Both versions are of the form a.b.c.d, where a,b,c&d are integers. ; @error =1 if $ver1 is not stuctured properly ; @error =2 if $ver2 is not stuctured properly ; @error =3 if the abcd components are not proper integers. Func _IsVer1GEVer2($ver1,$ver2) Local $arr1[5],$arr2[5] Local $n11,$n12,$n13,$n14 Local $n21,$n22,$n23,$n24 Local $ntot ; $arr1=StringSplit($ver1,'.') If $arr1[0] <> 5 Then SetError(1) Return False EndIf $arr2=StringSplit($ver2,'.') If $arr2[0] <> 5 Then SetError(2) Return False EndIf ; $ntot=IsInt($n11)+IsInt($n12)+IsInt($n13)+IsInt($n14)+IsInt($n21)+IsInt($n22)+IsInt($n23)+IsInt($n24) If $ntot<>8 Then SetError(3) Return False EndIf ; $n11=$arr1[1] $n12=$arr1[2] $n13=$arr1[3] $n14=$arr1[4] ; $n21=$arr2[1] $n22=$arr2[2] $n23=$arr2[3] $n24=$arr2[4] ; If $n11>=$n21 And $n12>=$n22 And $n13>=$n23 And $n14>=$n24 Then Return True Return False EndFunc; _IsVer1GEVer2 Licensing.au3Extended _Max & _Min_MsgBoxExitVarious extensions to _GuiCtrl...Run Dos programs output into an array etc (Updated 19-Feb-06)Extensions to Array library, primarily in two dimensions (updated 20-Feb-06)Version dependency calculator, _IsVer1GEVer2User Management, answering some domain questions (updated 19-Feb-06, various bugfixes and new functions added)Extensions to registry manipulation, including a recursive search & replaceDelimited string library (updated 19-Feb-03, added _DelimListSort)String library extensionsTerminal Server supportFile libraryCommand line parser (added 18-Feb-06)(UDF homepage) (Scit4Au3 UserCallTips added 21-Feb-06) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now