>>>>> "John" == John Leuner <[EMAIL PROTECTED]> writes:
John> char buf[1024];
John> jstring retval;
John> sprintf((char*)&buf, "%G", d);
John> Why is there a cast to char*, surely buf is a char* itself (not
John> needing the & operator)?
This code is just wrong.
It should read simply `buf' or perhaps `&buf[0]'.
John> What needs to be done to get this output conformant with what
John> SUN's JVM prints out?
I don't know. In libgcj we seem to have our own native implementation
of Double.toString which does not use sprintf. I don't know whether
our implementation is strictly correct.
Tom
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath