Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Currency Library for Ada?

108 views
Skip to first unread message

A.J.

unread,
Apr 13, 2023, 10:17:28 AM4/13/23
to
Does anyone know if Ada has a currency library? Ideally one that includes the ISO 4217 currency standard?

I've seen currency referenced as examples in the Style Guide[1] and other documentation[2] but I'm having trouble searching for anything concrete (and googling "ada" and "currency" has not helped due to some unfortunately named crypto stuff).

I'm also interested in if there's any ada libraries for iso 3166 (country codes).

If none of this exists, that's fine, it just gives me a reason to build it out myself, but I don't want duplication of effort :)

AJ.

[1] https://ada-lang.io/docs/style-guide/Reusability/#guideline-16
[2] https://docs.adacore.com/live/wave/aunit/html/aunit_cb/aunit_cb/fixture.html

J-P. Rosen

unread,
Apr 13, 2023, 1:37:22 PM4/13/23
to
Le 13/04/2023 à 16:17, A.J. a écrit :
> I'm also interested in if there's any ada libraries for iso 3166 (country codes).
It's a standard package, Ada.Locales

--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
https://www.adalog.fr https://www.adacontrol.fr

A.J.

unread,
Apr 13, 2023, 2:12:22 PM4/13/23
to
J-P. Rosen,

On Thursday, April 13, 2023 at 1:37:22 PM UTC-4, J-P. Rosen wrote:
> It's a standard package, Ada.Locales

Thanks for finding that! This looks like a good foundation for validating county codes, though it doesn't appear to contain an index of them, or expand into the 3-letter codes (e.g. USA vs US). I was looking into the implementation, and the GNAT[1] runtime seems to be true to spec, while the Drake runtime[2] looks like it's expanding into closer to what I'm looking for with its iso639 tables [3]. I may be able to build on this set, though and use the existing structures.

AJ

[1] https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgnat/a-locale.ads & https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgnat/a-locale.adb
[2] https://github.com/ytomino/drake/blob/master/source/environment/a-locale.ads
[3] https://github.com/ytomino/drake/blob/master/source/environment/a-locale.adb#L60
Message has been deleted
Message has been deleted
0 new messages