// https://sites.google.com/a/jsc-solutions.net/backlog/knowledge-base/2015/201508/20150829 static void Main(string[] args) { // X:\opensource\github\meganz\sdk\src\megaapi.cpp // X:\opensource\github\meganz\sdk\examples\win32\testmega\main.cpp // X:\opensource\github\meganz\sdk\include\megaapi.h // X:\opensource\github\meganz\sdk\include ScriptCoreLibNative.SystemHeaders.stdio_h.puts("enter"); // xmegaapi.exe.c(1025) : warning C4047: '=' : 'const char *' differs in levels of indirection from 'int' float4x4(); Console.WriteLine("hi bakery!"); Console.WriteLine(foo.fooinvoke()); // sizeof in C? var halfWayThere = new halfWayThere { other = 2 }; halfWayThere.next = new halfWayThere { }; // C : Opcode not implemented: stelem.i8 at xmegaapi.Program.Main halfWayThere.fixed1[0] = 1; var x = halfWayThere.fixed1[0]; //var x44 = halfWayThere.fixed1[44]; // http://stackoverflow.com/questions/382993/why-do-compilers-not-warn-about-out-of-bounds-static-array-indices // xmegaapi.exe.c(12) : error C2106: '=' : left operand must be l-value // x[][] = y; halfWayThere.fixed2[2, 2] = 22; // there0->fixed2[2][2] = ((signed long)(22)); var x22 = halfWayThere.fixed2[2, 2]; var fc = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("x22: "); Console.Write(x22); Console.WriteLine(";"); Console.ForegroundColor = fc; //num2 = there0->fixed2[2][2]; //halfWayThere.data[1, 1].fixed1[1] = 1; // TestFieldInitFixedDimensionalArray_almostWhatWeWant*_Address(there0->data, 1, 1)->other = 1; halfWayThere.data[1, 1].other = halfWayThere.other; fixed(almostWhatWeWant *rt = &halfWayThere.data[1, 1]) { // jni/OVRVrCubeWorldSurfaceViewXNDK.dll.c:239:9: error: conversion to non-scalar type requested //OVRVrCubeWorldSurfaceViewXNDK_VrCubeWorld_ovrRenderTexture_ovrRenderTexture_SetCurrent((OVRVrCubeWorldSurfaceViewXNDK_VrCubeWorld_ovrRenderTexture)texture_6); //// 1085 // TestFieldInitFixedDimensionalArray_almostWhatWeWant_ovrRenderTexture_SetCurrent((TestFieldInitFixedDimensionalArray_almostWhatWeWant)want_4); rt->ovrRenderTexture_SetCurrent(); (*rt).ovrRenderTexture_SetCurrent(); //xmegaapi.exe.c(1120) : error C2440: 'type cast' : cannot convert from 'TestFieldInitFixedDimensionalArray_almostWhatWeWant *' to 'TestFieldInitFixedDimensionalArray_almostWhatWeWant' //xmegaapi.exe.c(1120) : error C2440: 'function' : cannot convert from 'TestFieldInitFixedDimensionalArray_almostWhatWeWant' to 'TestFieldInitFixedDimensionalArray_almostWhatWeWant *' //xmegaapi.exe.c(1120) : warning C4024: 'TestFieldInitFixedDimensionalArray_almostWhatWeWant_ovrRenderTexture_SetCurrent' : different types for formal and actual parameter 1 //done } Console.WriteLine("bye!"); }
// https://sites.google.com/a/jsc-solutions.net/backlog/knowledge-base/2015/201508/20150829 static void Main(string[] args) { // X:\opensource\github\meganz\sdk\src\megaapi.cpp // X:\opensource\github\meganz\sdk\examples\win32\testmega\main.cpp // X:\opensource\github\meganz\sdk\include\megaapi.h // X:\opensource\github\meganz\sdk\include ScriptCoreLibNative.SystemHeaders.stdio_h.puts("enter"); // xmegaapi.exe.c(1025) : warning C4047: '=' : 'const char *' differs in levels of indirection from 'int' float4x4(); Console.WriteLine("hi bakery!"); Console.WriteLine(foo.fooinvoke()); // sizeof in C? var halfWayThere = new halfWayThere { other = 2 }; halfWayThere.next = new halfWayThere { }; // C : Opcode not implemented: stelem.i8 at xmegaapi.Program.Main halfWayThere.fixed1[0] = 1; var x = halfWayThere.fixed1[0]; //var x44 = halfWayThere.fixed1[44]; // http://stackoverflow.com/questions/382993/why-do-compilers-not-warn-about-out-of-bounds-static-array-indices // xmegaapi.exe.c(12) : error C2106: '=' : left operand must be l-value // x[][] = y; halfWayThere.fixed2[2, 2] = 22; // there0->fixed2[2][2] = ((signed long)(22)); var x22 = halfWayThere.fixed2[2, 2]; var fc = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("x22: "); Console.Write(x22); Console.WriteLine(";"); Console.ForegroundColor = fc; //num2 = there0->fixed2[2][2]; //halfWayThere.data[1, 1].fixed1[1] = 1; // TestFieldInitFixedDimensionalArray_almostWhatWeWant*_Address(there0->data, 1, 1)->other = 1; halfWayThere.data[1, 1].other = halfWayThere.other; fixed (almostWhatWeWant* rt = &halfWayThere.data[1, 1]) { // jni/OVRVrCubeWorldSurfaceViewXNDK.dll.c:239:9: error: conversion to non-scalar type requested //OVRVrCubeWorldSurfaceViewXNDK_VrCubeWorld_ovrRenderTexture_ovrRenderTexture_SetCurrent((OVRVrCubeWorldSurfaceViewXNDK_VrCubeWorld_ovrRenderTexture)texture_6); //// 1085 // TestFieldInitFixedDimensionalArray_almostWhatWeWant_ovrRenderTexture_SetCurrent((TestFieldInitFixedDimensionalArray_almostWhatWeWant)want_4); rt->ovrRenderTexture_SetCurrent(); (*rt).ovrRenderTexture_SetCurrent(); //xmegaapi.exe.c(1120) : error C2440: 'type cast' : cannot convert from 'TestFieldInitFixedDimensionalArray_almostWhatWeWant *' to 'TestFieldInitFixedDimensionalArray_almostWhatWeWant' //xmegaapi.exe.c(1120) : error C2440: 'function' : cannot convert from 'TestFieldInitFixedDimensionalArray_almostWhatWeWant' to 'TestFieldInitFixedDimensionalArray_almostWhatWeWant *' //xmegaapi.exe.c(1120) : warning C4024: 'TestFieldInitFixedDimensionalArray_almostWhatWeWant_ovrRenderTexture_SetCurrent' : different types for formal and actual parameter 1 //done } Console.WriteLine("bye!"); }