• I found no example or tutorial of this. If it can, how?

    Let us use the following c file as example:

    1. //What files do I include here???
    2. extern int getInputState(int pos);
    3. char* jsCode = "\
    4. function ShowInputsState()\
    5. {\
    6. var res = '';\
    7. for (var i = 0; i < 10; i++)\
    8. {\
    9. var state = getInputState(i);\
    10. res += '\nState of Input ' + i + ' is: ' + state;\
    11. }\
    12. return res;\
    13. }\
    14. \
    15. print(ShowInputsState());\
    16. \
    17. ";
    18. void main()
    19. {
    20. //What do I do here to run the js code???
    21. }
About

Avatar for user53337 @user53337 started