Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pointers to arrays...
#1
Alright - I've got a UDT that defines the data for an object in my GUI. The UDT contains a static array of 64 elements called Params(). Each element stands for extra parameters not common to the simpler controls (such as scrollbar values, pointers to event procedures, etc.)

The Tab control I'm writing requires an array of strings to use as tab captions, but I can't seem to figure out how to store a pointer to an array into one of the Params() elements (Params is of type INTEGER.) I want to be able to pass the array by pointer, and to be able to use all of the standard functions with this array inside the Tab handler routine (e.g., I still need to be able to use LBOUND/UBOUND, etc.)

I love pointers, now, because FB makes them simple, but I'm not exactly pointer-boy yet. Can someone help me out?
color=blue]subxero - admin at this place.[/color]
Reply
#2
dim array(10) as integer
dim arrayptr as integer ptr
arrayptr = @array(0)

arrayptr[4] = 100
print array(4)

sleep
url]http://fbide.sourceforge.net/[/url]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)