Afficher un message
Vieux 05/01/2008, 18h15   #2
Stefano Crocco
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Convert bignum to numeric and formatting

Alle sabato 5 gennaio 2008, Damaris Fuentes ha scritto:
> Hi you all,
>
> I'm trying to format a Bignum such as 1012345556 into 1.012.345.556
> (separating the thousands).
> I've seen the extension of Numeric [1] can do that but, how can I
> convert my Bignum to a Numeric?
>
> Thanks.
>
> [1] http://extensions.rubyforge.org/rdoc...s/Numeric.html


You don't need to convert a Bignum into a Numeric because it already is:
Bignum is a subclass of Integer, which is a Subclass of Numeric.

Stefano

  Réponse avec citation
 
Page generated in 0,05561 seconds with 9 queries