[futurebasic] Re: [FB] DCODs & calling functions

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: Rick Brown <rbrown@...>
Date: Tue, 04 May 1999 19:25:24 -0500

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