|(require version/patchlevel)||package: base|
|(require version/check)||package: base|
`(ok-but ,version) —
You have a fine stable version, but note that there is a newer alpha version available numbered version.
`(newer ,version) —
You have an old version. Please upgrade to version.
`(newer ,version ,alpha) —
You have an old-but-stable version, please upgrade to version; you may consider also the newer alpha version numbered alpha.
`(error ,message) —
An error occurred, and message is a string that indicates the error.
`(error ,message ,additional-info) —
An error occurred; message is a string that indicates the error, and additional-info is a string containing a system error. The additional-info content is always parenthesizes, so message is a short error and (string-append message " " additional-info) is a verbose one.
A valid version has one of the following forms:
subject to the following constraints:
‹maj›, ‹min›, ‹sub›, and ‹rel› are all canonical decimal representations of natural numbers (i.e., decimal digits with no leading 0 unless the number is exactly 0)
‹rel› is not 0
‹sub› is not 0 unless ‹rel› is included
‹min› has no more than two digits
‹sub› and ‹rel› have no more than three digits
The constraints force version numbers to be in a canonical form. For example, a would-be version string "4.3.0" must be written instead as "4.3", "184.108.40.206" must be written instead as "4.3.1", and "4" must be written as "4.0".
A version number of the form ‹maj›.‹min›, ‹maj›.‹min›.‹sub›, or ‹maj›.‹min›.‹sub›.‹rel› is an alpha version if ‹min› is 90 or more, ‹sub› is 900 or more, or ‹rel› is 900 or more.
Note that this is the only function that deals with legacy version strings.