lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Sep 4, 2016 at 8:24 PM, Sean Conner <sean@conman.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 [1], I think there
> might be some issue with currency conversion.
>
>   -spc
>
> [1]     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.

/s/ Adam