The library provides an implementation of dimensioned values for Ada. Unit checks are made at run-time, if not optimized out by the compiler. SI and irregular measurement units are supported. Shifted units like degrees Celsius are supported too. Conversions from and back to strings are provided for all various irregular units. An extensive set of GTK widgets for dealing with dimensioned values is included, though use of GTK is not mandatory for the rest of the library.

Features

  • The type Unit denotes the dimension of a physical entity
  • The type Measure represents a dimensioned value
  • Mixed unit arithmetic. Values in SI (Le Système International d'Unités) units can be mixed with irregular units (such as foot and yard) as long as the result is defined
  • Shifted unit support (a widely used instance of a shifted unit is degree of Celsius)
  • The type Measure is generic, parameterized by a floating-point type. A non-generic version based on the type Float is also provided
  • String to Measure conversion supports as wide set of irregular units as possible
  • Currently the powers of the base unit components lie in the range -8..7. This limitation has an implementation reason (absence of 64-bit modular integers in some Ada compilers)
  • GTK+ widgets for a comfortable visual measurement unit editing and selection. The rest of the library can be used independently on this part as well as on GTK+
  • Ada 95, 2005, 2012 compliant. GTK+ widgets require at least Ada 2005
  • Tables for Ada and Strings Edit for Ada libraries are included

Project Samples

Project Activity

See All Activity >

Categories

Physics, Libraries

License

GNU Library or Lesser General Public License version 3.0 (LGPLv3)

Follow Units of measurement for Ada

Units of measurement for Ada Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Units of measurement for Ada!

Additional Project Details

Operating Systems

BSD, Cygwin, Linux, VxWorks, Windows

Intended Audience

Developers

User Interface

GTK+, Win32 (MS Windows)

Programming Language

Ada

Related Categories

Ada Physics Software, Ada Libraries

Registered

2014-07-26