REBOL 3.0

Currency designator for money datatype

Carl Sassenrath, CTO
REBOL Technologies
14-May-2009 17:15 GMT

Article #0201
Main page || Index || Prior Article [0200] || Next Article [0202] || 22 Comments || Send feedback

In R2, we allowed a currency designation for money, such as:

USD$100.00
EUR$240.00

In R3, we do not yet support this format.

However, it would be possible to support standard currencies (at least up to some reasonable limit, say 256.) Here's a list of World Currencies, Listed by ISO 4217 Currency Abbreviation.

I'm polling the group to see if you want this feature supported.

To access the currency field we would add a new selector that would return the currency as a word:

amount: USD$100.00
probe amount/currency
USD
amount/currency: 'EUR
print amount
EUR$100.00

Of course, it's just a "label change". No exchange rate conversion is done. You would need to code such methods yourself.

22 Comments

REBOL 3.0
Updated 12-Dec-2017 - Edit - Copyright REBOL Technologies - REBOL.net