> Pete wrote: > >> Hi all.... >> >> Can I pass the address of a FN which lives in the app calling the DCOD and >> have the DCOD use the FN as if it was just another FN ?? >> >> (snip) > >> >> CALL addressOfPrintFN& (textH&) >> >> address of print FN is obtained by doing: >> addressOfPrintFN& = @FN myPrintFN >> in the app at startup time > > You can use the value returned by @FN, but not the way you've shown. Instead > of using CALL, you should use the FN USING statement. > > CALL is suitable if you're referring to the address of a label that's in front > of an ENTERPROC statement (such as would be returned by the LINE function). > ENTERPROC procedures and LOCAL FN's pass parameters in different ways, and you > need to call them in different ways. > > - Rick Just to make sure I'm clear on this... An app builds a list of FNs inside it's self using address& = @FN FNname The app then calls a DCOD. The DCOD is in an external rsrc file. The DCOD wants to use a FN in the callling app so it does a DEF FN FNname(a, b, c) USING address& then the DCOD calls the FN it wants with: FN FNname(a, b, c) so Rick, is this about right ??