Re: access R4GL global variables from C function
Posted in 1992
Quoting mak... > > I recently made a posting regarding V4.00.UH2 R4GL I have another > related query that I would like answered if possible. > How can I access R4GL global variables from within a C function. > Assuming your 4GL code looks similar to this... GLOBALS DEFINE my_variable1 DATE DEFINE my_variable2 CHAR(16) DEFINE my_variable3 SMALLINT END GLOBALS Your C code should look similar to this... extern long my_variable1; extern char my_variable2[17]; /* Need 1 extra byte for the NULL terminator */ extern short my_variable3; You then need to put your C code into a "custom" runner and run your 4GL program with that runner. DAS -- David A. Snyder @ Snide Inc. - Folcroft, PA Current Release is db4glgen-3.6 UUCP: ..!uunet!das13!dave INTERNET: dave.snyder@snide.com