[futurebasic] Re: Function Pointers

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

From: tedd <tedd@...>
Date: Mon, 25 May 1998 09:39:32 -0400
>... How do you get a pointer to a function?
>
>-Forrest Blanton


Forrest:

It's done the same way as you create a function prototype, namely:

   LOCAL FN myFunction
      'Place code here
   END FN

   gMyFunctionPtr& = @FN myFunction

Now you have a pointer for your function. Anytime you reference the
pointer, the program will drop into the function. What's really nice is
when you make pointers for your data as well as for your functions and
place everything in a linked list to be activated by a single reference. I
used that method of programming for a "Street Atlas" type program.


tedd



___________________________________________________________________
<mailto:tedd@...>	               http://sperling.com/