[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Currency representation in Lua
- From: Coda Highland <chighland@...>
- Date: Sun, 4 Sep 2016 21:02:30 -0700
On Sun, Sep 4, 2016 at 8:24 PM, Sean Conner <firstname.lastname@example.org> wrote:
> It was thus said that the Great Luiz Henrique de Figueiredo once stated:
>> > Has someone any experience to share about implementing a system that deals
>> > with currency values?
>> Express your amount in cents, not dollars (or euros or reais).
>> You can then use integers instead of floats.
>> It works even in Lua versions before 5.3
> Just a quick question---is there a smaller unit than the Euro? Or Reais?
> While I can't complain about using cents over dollars , I think there
> might be some issue with currency conversion.
>  As a citizen of the United States
A one-hundredth division of a euro is also called a cent.
The real is divided into 100 centavos, which is a straightforward translation.