T
Tom
I have two version numbers - one for my application and another from a
manifest, database, whatever - that isn't important. Now that I have these
two version numbers (in the form major.minor.build.revision) I want to
compare one to see if it is less than the other.
Is there any calculation I can do to convert a version number to a 'real'
number so that I can compare it easily? I've fiddled around with various
methods but nothing works for everything. I have tried to compare the
individual elements one at a time, but there are so many deviations that it
again doesn't work for everything (i.e. 1.9.9.0 is higher than 1.9.8.920).
There seems like there should be some mathematical way to convert this to
some kind of number so my code could simply say something like "if
current_converted_version < new_converted_version then ...'.
Anyone good mathematicians out there??
Tom
manifest, database, whatever - that isn't important. Now that I have these
two version numbers (in the form major.minor.build.revision) I want to
compare one to see if it is less than the other.
Is there any calculation I can do to convert a version number to a 'real'
number so that I can compare it easily? I've fiddled around with various
methods but nothing works for everything. I have tried to compare the
individual elements one at a time, but there are so many deviations that it
again doesn't work for everything (i.e. 1.9.9.0 is higher than 1.9.8.920).
There seems like there should be some mathematical way to convert this to
some kind of number so my code could simply say something like "if
current_converted_version < new_converted_version then ...'.
Anyone good mathematicians out there??

Tom