Obtaining the complement of a Currency value

M

matthewjbarr

Hi,

I was wondering if there was a straightforward method of obtaining the
complement (i.e. the postive value) of a Currency object. Failing that,
is there a method of obtaining the same thing for a float?

Cheers,

Matt
 
P

Pete Barrett

Hi,

I was wondering if there was a straightforward method of obtaining the
complement (i.e. the postive value) of a Currency object. Failing that,
is there a method of obtaining the same thing for a float?
Does Currency have a value? As far as I can see, all it holds is the
symbol, the ISO 4217 currency code, and the number of digits after the
currency point.

For a float or double there's Math.abs(...). Or is that not what you
mean?


Pete Barrett
 
R

Roedy Green

I was wondering if there was a straightforward method of obtaining the
complement (i.e. the postive value) of a Currency object. Failing that,
is there a method of obtaining the same thing for a float?

Currency objects just record details about a currency, i.e. how to
display it. They are not for storing currency values.

see http://mindprod.com/jgloss/currency.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top