fgl function calls by reference
Posted in 1995
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
We are trying to create a fglgo runner so that it would be able to call a 4gl function as follows: MAIN define prog char(30) let prog = "myfunc" call callbyref("myfunc") END MAIN function myfunc() display "HI THERE, YOU MADE IT" end function Where callbyref is a C function that will call the 4GL function. The idea is to create a menu system that is set up by the user. Therefore the program must call functions dependent of the variable passed. We had got around this in the past with a small redirector program that in essence did the following: case variable when "X" call "X" when "Y" call "Y" etc. As you can see this is a bit of a headache when you get into the 200 function region. We have tried to use fgiusr.c, fgl_call and the rest but the cfglgo compiler insists that there exists a main function in C. If you leave this empty, the program happily executes nothing and returns to the system prompt. If you try to trick the C's main to fgl_call the 4gl's main, then you get errors about redefining existing variables Any Ideas?? Andrew Cilia (Philip Toledo Limited - Malta)