Next: , Previous: , Up: scheme library form   [Index]


3.7.1.5 The version reference

A ?version-reference specifies a set of ?versions that it matches. The ?library-reference identifies all libraries of the same name and whose version is matched by the ?version-reference. A ?version-reference has the following form:

(?sub-version-reference1 ... ?sub-version-referenceN)
(and ?version-reference ...)
(or ?version-reference …)
(not ?version-reference)

A ?version-reference of the first form matches a ?version with at least n elements, whose ?sub-version-references match the corresponding ?sub-versions. An and ?version reference matches a version if all ?version-references following the and match it. Correspondingly, an or ?version-reference matches a version if one of ?version-references following the or matches it, and a not ?version-reference matches a version if the ?version-reference following it does not match it.

A ?sub-version-reference has one of the following forms:

?sub-version
(>= ?sub-version)
(<= ?sub-version)
(and ?sub-version-reference …)
(or ?sub-version-reference …)
(not ?sub-version-reference)

A ?sub-version-reference of the first form matches a ?sub-version if it is equal to it. A >= ?sub-version-reference of the first form matches a sub–version if it is greater or equal to the ?sub-version following it; analogously for <=. An and ?sub-version-reference matches a sub–version if all of the subsequent ?sub-version-references match it.

Correspondingly, an or ?sub-version-reference matches a sub–version if one of the subsequent ?sub-version-references matches it, and a not ?sub-version-reference matches a sub–version if the subsequent ?sub-version-reference does not match it.

Examples:

version referenceversionmatch?
()(1)yes
(1)(1)yes
(1)(2)no
(2 3)(2)no
(2 3)(2 3)yes
(2 3)(2 3 5)yes
(or (1 (>= 1)) (2))(2)yes
(or (1 (>= 1)) (2))(1 1)yes
(or (1 (>= 1)) (2))(1 0)no
((or 1 2 3))(1)yes
((or 1 2 3))(2)yes
((or 1 2 3))(3)yes
((or 1 2 3))(4)no

Next: , Previous: , Up: scheme library form   [Index]