Procedures return pointers with types
Posted: Thu Nov 01, 2007 1:20 am
It would be nice to be able to return a pointer from a procedure and maintain the structure being pointed to. For example, this would be nice:
Thanks.
Code: Select all
Structure foo
a.l
b.l
EndStructure
*Procedure.foo return_foo_ptr(*return_me.foo)
; Or maybe just "Procedure.foo" and assume it's always a pointer that's returned
ProcedureReturn *return_me
EndProcedure
Define.foo a_foo
Define.foo *a_ptr
return_foo_ptr(@a_foo)\a = 23
; same as:
;*a_ptr = return_foo_ptr(@a_foo)
;*a_ptr\a = 23