2 Replies Latest reply on Aug 18, 2008 10:49 AM by papiot

    Flex 3 > Data Types > Number vs Long (Java & .Net)

    sakthik
      Hello All

      I am developing a prototype for my client. We have planned to use Flex 3 as a client side application which would
      communicate with .Net based application at server side. It could be a socket or RMI communication, not decided.

      My question is:
      What is the equivalent data type in Flex 3 for 'long' (primitive) in .Net or Java ?. Both Java and .Net uses 64bit for long primitive data type.
      Flex 3 has 'Number' as a datatype which is 64 bit including double/float decimal values. So, that actually give only 53 bit representation for a long value. For example, try this on your action script:
      var num:Number = 9223372036854775807; // Equivalent to Long.MAX_VALUE in Java
      trace(num.toString());

      You will see 9223372036854776000, which is wrong.

      How do I overcome this situation, because I got to communicate with .net based server which involves send/receive 'long' primitives.

      Thanks
      //Sakthik
      Text