Pass Pointer through procedures [message #55257] |
Thu, 09 August 2007 05:29 |
payon
Messages: 11 Registered: July 2007
|
Junior Member |
|
|
Hello,
what is the simpliest way to pass pointers through procedures? I
couldn't find anything which exlpain it well. Ok, I read some
different things a bout pointers and they weren't helpful.
My problem ist:
I have two procedures.
In the one for example the imagedata is read out.
pro opendata
image=openedata()
ptrimage=ptr_new(image)
end
In the next procedure i want to operate with that pointer so
pro calculate
meanimage=(*ptrimage)
end
But he can't find the pointer. so I thought pointers are globally. But
what for are they, when i just can read them only inside one
procedure.
Well i found out, that there is a possiblility to pass the pointer
with
COMMON ptr_block, ptrimage
But i don't think, it's the best way.. Because when I have to pass the
pointer with COMMON block, i also could pass the whole data through
it. Or is there another possibility to pass a pointer through
different procedures and functions?
greetings
martin
|
|
|