That may be true, but flash and any other program is still limited by
the IEEE floating point specs double precision limits. Flash cannot
internally represent 21 digits without resorting to scientific
notation. If you add a stray '1' to your 21 digit number as the least
significant digit you'll find that the number is not changed.
i.e.
var number1 = 1000000000000000000000;
var number2 = 1000000000000000000001;

trace(number1 == number2); // traces 'true'

depending on how you're communicating with the server, you may have to
stream it in as binary data and write your own 'bigint' (like java)
class to parse it, or use a server side script to parse it into a
string format for flash.

Jonathan

On 11/6/06, Hans Wichman <[EMAIL PROTECTED]> wrote:
Hi Chris,
thanks for your reply.
According to the manual flash should be able to handle numbers up to
1.79769313486232e+308?
Mine is 1e+21 so it seems i should have a little way to go before i max
out:).

Threading the number as a string isnt possible, since the webservice
interface requires Int64.
If i cast the number i get from the service to a string, my string reads....
"1e+21"

Any ideas?
JC


On 11/6/06, Chris Benjaminsen <[EMAIL PROTECTED]> wrote:
>
> Hi Hans
>
> The numbers you are trying to store are way to large for Flash to handle
> as a number.
> If you however just thread the numbers as strings it should work
> perfectly.
>
> /Chris
>
> Hans Wichman wrote:
> > Hi list,
> >
> > i need to talk to webservices which pass me back very large db id's,
> > which
> > im using again to request more info.
> > However when i do (for example):
> > var b:Number = 1000000000000000000000;
> > trace (b);
> > it prints 1e+21
> >
> > Now when I use this value as an argument to this webservice it seems to
> > fail.
> > When I use a tool like wsstudio2 and copy and paste the long version, it
> > works fine.
> >
> > Any ideas on how to fix this?
> > greetz
> > JC
> > _______________________________________________
> > [email protected]
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
>
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to