[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.5.60 `version-compare' - compare two version numbers

Usage: (version-compare op v1 v2)
Converts v1 and v2 strings into 64 bit values and returns the result of running 'op' on those values. It assumes that the version is a 1 to 4 part dot-separated series of numbers. Suffixes like, "5pre4" or "5-pre4" will be interpreted as two numbers. The first number ("5" in this case) will be decremented and the number after the "pre" will be added to 0xC000. (Unless your platform is unable to support 64 bit integer arithmetic. Then it will be added to 0xC0.) Consequently, these yield true:

 
(version-compare > "5.8.5"       "5.8.5-pre4")
(version-compare > "5.8.5-pre10" "5.8.5-pre4")

Arguments:
op - comparison operator
v1 - first version
v2 - compared-to version


This document was generated by Bruce Korb on September, 30 2006 using texi2html 1.76.

Viewable With Any Browser   autogen Home