Last modified on 27 October 2012, at 22:14

REBOL Programming/cvs-version

USAGE:Edit

CVS-VERSION str 

DESCRIPTION:Edit

Converts CVS version number.

CVS-VERSION is a function value.

ARGUMENTSEdit

  • str -- (Type: any)

SOURCE CODEEdit

cvs-version: func [
    "Converts CVS version number." 
    str /local rev ver
][
    parse str [
        thru #":" copy ver to #"." skip 
        copy rev [to #"." | to #" "] 
        (
            rev: to-integer trim rev 
            ver: to-integer (to-integer trim ver) + (rev / 256) 
            rev: rev // 256 
            str: to-tuple reduce [ver rev]
        )
    ] 
    str
]