#2682 Buf.writeI8 fails in javascript

jhughes Thu 1 Feb

Buf().writeI8 throws an error when called in a browser. No compilation error exists so the compiler at least believes this is js friendly but when invoked you get this error in the browser:

sys.js:409 Uncaught TypeError: this.m_out.writeI8 is not a function
  at fan.sys.Buf.writeI8 (sys.js:409)

It is worth mentioning that this appears to be the only writeMethod with this issue and testing with writeI4 does not contain this issue. Is it possible there's an issue with 64 bit support methods for js?

andy Thu 1 Feb

What version are you using?

andy Thu 1 Feb

That method should be working in 1.0.70

However, be aware JavaScript models all numbers using 64-bit floating point -- which limits their integer resolution to 53 bits.

So you cannot actually represent a full 64-integer properly in JS.

Login or Signup to reply.