[Nestedvm] Possible to pass floats in call in NestedVM?

skinhat skinhat skinhat at hotmail.com
Mon Mar 18 16:04:56 EDT 2013


I have been looking at NestedVM calls to functions in the CallTest.java example. It appears to me you can pass Strings and integers quite easily to functions but is there a way to pass a float?

For example this passes an integer 2 to the function 'echo' in test.c:
rt.call("echo",new Object[]{"Hello, World, from the Object[] call method",new Integer(2)});

I modified test.c to have a float in the function but it is always zero:
rt.call("echo",new Object[]{"Hello, World, from the Object[] call method",new Integer(2)}, new Float(3.5f));

I have tried converting the float into raw int bits:
ia[i]=Float.floatToRawIntBits(f);

in runtime.java but just comes out to a huge integer.

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.hcoop.net/pipermail/nestedvm/attachments/20130318/2c9d5018/attachment.htm 


More information about the Nestedvm mailing list