It might for the marshalling, but don't go around doing currency
calculations with a double.  It is inexact like float.

Then again.  Maybe you could skim that 100ths of cents off and...

-- 
Dave Wolf
Cynergy Systems, Inc.
Adobe Flex Alliance Partner
http://www.cynergysystems.com
http://www.cynergysystems.com/blogs

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY


--- In [email protected], "Mike_Robinson_98"
<[EMAIL PROTECTED]> wrote:
>
> Yes, that definitely does the trick. Thanks for your help.
> 
> --- In [email protected], "Peter Farland" <pfarland@> wrote:
> >
> > As a work around for now, try using double instead of float.
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > ________________________________
> > 
> > From: [email protected]
[mailto:[EMAIL PROTECTED] On
> > Behalf Of Mike_Robinson_98
> > Sent: Friday, July 21, 2006 5:00 PM
> > To: [email protected]
> > Subject: [flexcoders] Re: AMF serialization of floats (REPOST)
> > 
> >  
> > 
> > Dave, thanks for your response. I'm not sure what exact number type
> > you have in mind (Integer?BigDecimal?). The data is decimal data, no
> > getting around that. There don't seem to many choices as far as what
> > data type to use. What do flex programmers do in this situation when
> > they want to serialize currency values, such as item prices which have
> > 2 decimal precision? Convert to a String first? 
> > 
> > It seems to me that it boils down to one thing - the data will have to
> > be manipulated in *some* way once it has been reconstituted on the
> > client side. This manipulation might be converting the String back to
> > a Number, rounding the Number to the desired precision, or any of
> > several other methods. None of which, to me, are very desirable.
> > 
> > --- In [email protected]
<mailto:flexcoders%40yahoogroups.com>
> > , "Dave Wolf" <gatorj24@> wrote:
> > >
> > > Don't use floats. <wink>
> > > 
> > > Seriously however, floats are inexact numeric types. They're not 
> > > going to have a fixed precision in general and this is especially 
> > > true when they are marshalled across languages. Can you use an 
> > > exact numeric type instead?
> > > 
> > > -- 
> > > Dave Wolf
> > > Cynergy Systems, Inc.
> > > Adobe Flex Alliance Partner
> > > http://www.cynergysystems.com <http://www.cynergysystems.com> 
> > > http://www.cynergysystems.com/blogs
> > <http://www.cynergysystems.com/blogs> 
> > > 
> > > Email: dave.wolf@
> > > Office: 866-CYNERGY
> > > 
> > > 
> > > 
> > > 
> > > 
> > > --- In [email protected]
> > <mailto:flexcoders%40yahoogroups.com> , "Mike_Robinson_98" 
> > > <mike_robinson_98@> wrote:
> > > >
> > > > My original post seems to have gotten removed, so I am posting 
> > > again
> > > > with hopes someone has experience with this issue.
> > > > 
> > > > I am transfering float values from Java DTOs to corresponding AS
> > > > objects using both FDS and remote objects. The Java float values 
> > > have
> > > > a precision of 4 decimal places (verified before serialization
e.g.
> > > > 0.4398) yet when they are created in AS they have 16 decimal
places
> > > > with values extending throughout the 16 digits (e.g.
> > > > 0.4398283772047382). I suppose I can round the values when I 
> > > receive
> > > > them at the client, but can someone tell me if there's a better 
> > > way to
> > > > insure the destination values are the same as the source?
> > > > 
> > > > Thanks,
> > > > Mike
> > > >
> > >
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to