< Rebol Programming
USAGE:
CVS-VERSION str
DESCRIPTION:
Converts CVS version number.
CVS-VERSION is a function value.
ARGUMENTS
- str -- (Type: any)
SOURCE CODE
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 ]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.