Compiled, CHAIN, "Illegal Function Call" Using LIBRARY (31933)






This article was previously published under Q31933

SUMMARY

When you CHAIN from one compiled program that uses the LIBRARY statement to a second compiled program, there is a case in which you get an "Illegal Function Call" when the same CHAIN works correctly in the interpreted version.

Within the interpreter, library routines opened with a LIBRARY statement are preserved across a CHAIN (unless you perform a LIBRARY CLOSE statement).

Unlike in the interpreter, the resource fork is always closed across a CHAIN in compiled programs. For compiled programs, the CHAINed program has to reinvoke the LIBRARY statement; otherwise, an "Illegal Function Call" (error 5) is generated when a routine from a LIBRARY file is invoked.

Modification Type: Minor Last Reviewed: 1/9/2003
Keywords: KB31933