Re: Interface between 4GL and UNIX C
Posted in 1998
Jing He wrote: > > Guys, > > I have a problem with a 4GL program. It was complied under HP-UX A.09.04 > and on-line 5.01.UD1. It runs fine. When I recomplie this 4GL program > under HP-UX B.10.20 and on-line 5.08.UD1, it has a problem to run it. The > problem happens when it tries to call a C function. The error message is > this:"FORMS statement error number -1320. A function has not returned the > correct number of values expected by the calling function". What does this > mean? But when I run the old executible code under new environment, it is > OK. I do not change the 4GL and C program. It seems that the interface has > changed under HP-UX B.10.20 and on-line 5.08.UD1. Someone has ideas? > > Thanks a bunch. In the past 4GL programs did not check the number of returned variables versus the number of variable listed in the RETURNING clause in the function call. Newer versions do. Your "C" program is returning a count of the number of values it pushed on the return stack that is not the same as the number of variables in the RETURNING list. If the "C" function is multi-purpose make sure that it returns the appropriate count for the arguments that it received so that an appropriate 4GL call will not produce that run-time error. Art S. Kagel