[omniORB] What the difference betwen long & double

Gary D. Duzan gdd0@gte.com
Tue, 07 Jul 1998 13:49:41 -0400


In Message <98Jul7.121037edt.11651-1@gateway.imagine-sw.com> ,
   boris@imagine-sw.com (Boris Khanales) wrote:

=>I have kind of complex data structure:
=>
=>
=>
=>
=>foo.idl
=>
=>struct Foo
=>{
=>sequence<any> data;
=>};
=>
=>interface Hoo
=>{
=>long method( in Foo f );
=>}
=>
=>
=>The client does something like this:
=>
=>Foo f;
=>f.data.length(1);
=>
=>Foo f2;
=>f2.data.length(1);
=>
=>// Attn !!!
=>if I do this:
=>f2.data[0] <<= 1L; Everithing OK
=>
=>BUT
=>f2.data[0] <<= 1.1; It does not work!!!
=>
=>f.data[0] <<= f2;
=>
=>
=>
=>Any ideas?
=>HELPPP!?!?!
=>

   Try "f2.data[0] <<= CORBA::Double(1.1);". It needs either a
CORBA::Double or a CORBA::Float, both of which are defined as classes
in OmniORB. It may be getting confused over which conversion to make,
so making it explicit could fix the problem.

					Gary Duzan
					GTE Laboratories