Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public Serial1 As Serial
Private Result As Int 'ignore
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
RunNative("Function", Null)
Log("Result: ", Result)
End Sub
#if C
#define def_2
// #define def_1
#ifdef def_1
void Function (B4R::Object* o) {b4r_main::_result = 1;}
#endif
#ifdef def_2
void Function (B4R::Object* o) {b4r_main::_result = 2;}
#endif
#End if