VersionNumber

Description

A simple way of comparing software version numbers consisting of digits separated by dots

Details

Source
GitHub
License
MIT
Created
June 4, 2026
Updated
June 4, 2026

Categories

Packaging / VCS

README excerpt

# VersionNumber
A simple Smalltalk package to handle comparisons of software version numbers.

## Example

```
| versionString version |
versionString := self fetchVersionStringFromSomewhere.
versionNumber := VersionNumber versionString: versionString.
(versionNumber between: '3.0' and '12.7.1') 
    ifFalse: [self error: 'incompatible version']
```

Tested in Pharo 13. It's likely compatible with other Smalltalk versions and dialects.
If anyone finds that it's not compatible with their Smalltalk environment, I'd welcome
pull requests.
← Back to results