A.J. Venter wrote:
So the question is:
1) does somebody HAVE an algorithm for this already ?
2) If not, can somebody give me a hint about what approach to take ?
Split the version string in several numbers:
version := '4.0.12';
major := 4
minor := 0;
patch := 12;
versionnumber := major * 10000 + minor * 100 + patch
then you can numerically compare version numbers.
the 100 (a) and 10000 (b) can be adjusted for your needs.
a must be bigger than the max number of patches
b must be bigger that the max numer of patches times the max numer of
minor versions.
So this algorithm can not 4.194.299
Vincent
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal