Version Information
Synopsis
(import (data version))
Generic record container for version information.
Versions
record: version
procedure: (version? any)
procedure: (make-version major minor patch string)
procedure: (make-version major minor patch)
procedure: (make-version major minor)
procedure: (make-version major)
procedure: (version-major version)
procedure: (version-minor version)
procedure: (version-patch version)
procedure: (version-string version)
Versions are records holding three numbers (or zero if not specified), and a descriptive string (or #f
if not applicable).
procedure: (version-compatible? a b)
Checks whether two records contain the same major version and a has lower or equal minor version and/or patchlevel than b.
String Conversion
procedure: (string->version string)
Decodes a textual representation of a version from the given string. Returns #f
in case of encoding errors.
procedure: (version->string version)
Encodes a textual representation of the given version into a string.
I/O Operations
procedure: (get-version port)
Read a binary representation of a version from the given port.
procedure: (put-version port version)
Write a binary representation of the given version to the given port.
procedure: (bytevector->version bytevector)
Decodes a binary representation of a version from the given bytevector. Returns #f
in case of encoding errors.
procedure: (version->bytevector version)
Encodes a binary representation of the given version into a bytevector.