W wcieslik Member Licensed User Longtime User Mar 26, 2019 #1 Hi , Sorry for what is probably a dumb question, but what is the "o" for after the B4R::Object* ? eg : B4X: RunNative("MySub",Null) #if C void MySub (B4R::Object* o) { blah,,, } #end if As the code compiles the compiler identifies every instance of these as an "unused parameter". eg: \\as01w0001\HBS_PAC_TSG_DATA\CARDFO~1\ARDUIN~1\_B4R_3~1\B4RCOD~1\CARDCO~1.1\Objects\bin\sketch\b4r_main.cpp:32:28: warning: unused parameter 'o' [-Wunused-parameter] void SendReg (B4R::Object* o) { ^
Hi , Sorry for what is probably a dumb question, but what is the "o" for after the B4R::Object* ? eg : B4X: RunNative("MySub",Null) #if C void MySub (B4R::Object* o) { blah,,, } #end if As the code compiles the compiler identifies every instance of these as an "unused parameter". eg: \\as01w0001\HBS_PAC_TSG_DATA\CARDFO~1\ARDUIN~1\_B4R_3~1\B4RCOD~1\CARDCO~1.1\Objects\bin\sketch\b4r_main.cpp:32:28: warning: unused parameter 'o' [-Wunused-parameter] void SendReg (B4R::Object* o) { ^
Erel B4X founder Staff member Licensed User Longtime User Mar 27, 2019 #2 You can use it to pass values in the RunNative call. See the second example: https://www.b4x.com/android/forum/threads/inline-c-c.65714/ Upvote 0
You can use it to pass values in the RunNative call. See the second example: https://www.b4x.com/android/forum/threads/inline-c-c.65714/
W wcieslik Member Licensed User Longtime User Mar 27, 2019 #3 Thanks Erel, much appreciated ! Upvote 0