##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: December, 2016 # Modified: 2016-12-16/23:12-0500 ##+ # # unirexx.icn, Invoke ooRexx from Unicon, with C and C++ interfaces # # tectonics: # gcc -o unirexx.so -shared -fPIC unirexx.c -lrexx -lrexxapi # g++ -o oorexx.so -shared -fPIC oorexx.c -lrexx -lrexxapi # procedure main() unirexx := loadfunc("./unirexx.so", "unirexx") result := unirexx("hello.rexx") write("Unicon RexxStart from file = " || result) write() result := unirexx("[PARSE SOURCE data]", "say \"Hello, from Rexx in Unicon\";" || " PARSE SOURCE a; return a") write("Unicon RexxStart from string = " || result) write("\n--------\nC++ API") oorexx := loadfunc("./oorexx.so", "oorexx") result := oorexx("hello.rexx") write("Unicon ooRexx C++ API rc = " || result) end