Friday, June 14, 2013

Units in Smalltalk

I uploaded a "ConfigurationOfUnits" to the MetaRepoForPharo20. With this the "Units" framework is easily loadable from the Pharo 2.0 config browser.

Here are some examples from the Unit framework:

(10km + 10km) gives you 20km

You can also convert easily

  (10km + 24m) as: 1m

gives you  10024 metres.

It is also simple to compare:

  1hour < 10 seconds

which gives you false.

No comments: