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 flexcoders@yahoogroups.com, "Dave Wolf" <[EMAIL PROTECTED]> 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/blogs
> 
> Email:  [EMAIL PROTECTED]
> Office: 866-CYNERGY
> 
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.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 --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/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