Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Need comparison help....Versions

$
0
0

I am trying to find the best way to go about a version comparison.  I am not wanting to compare file versions or anything like that.  I need to do a comparsion on what information is in a variable.

 

It's for a script version tool I'm maintaining.

 

The current version is say 5.2.1.

 

I need to find a good way of future proofing this with a check.  I need to perform one action if the script version is less than 5.2.1, but if it is 5.2.1 or anything newer, I need to perform a different action.

 

So I am thinking I am going to have to do some kind of recursive check after splitting the script version at the "."s.  

 

For example, a future script version could be 5.2.5 or 7.5.4.

 

So I guess I could use a stringsplit function and check the first # to see if it is great than 5 and then check the second # to see if it is greater than 2., etc.

 

Any suggestions on the most efficient way to go about this?

 

-hogfan


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>