04-19-2005, 04:17 PM
I have never used pointers, so it's a newbie question..
I have in a library module
a sub
then i have an array of pointers (parameters to foo)
and an init function that dims the array of ptrs and returns a pointer to it
My goal is to avoid declaring muarray as COMMON (this would be a QB solution)
and be able, in ANOTHER MODULE:
to call to init, retrieveing the pointer to myarray
then call foo passing to it one of the elements of my array
I can't find the correct set of type declarations to make it compile..
I have in a library module
a sub
Code:
sub foo (ubyte ptr)
Code:
dim myarray(10) of ubyte ptr
Code:
function init() as ?????
My goal is to avoid declaring muarray as COMMON (this would be a QB solution)
and be able, in ANOTHER MODULE:
to call to init, retrieveing the pointer to myarray
Code:
dim p as ?????
p=init()
then call foo passing to it one of the elements of my array
Code:
foo(*p(i))
Antoni