ProcedureReturn with pointers
Posted: Tue Jun 04, 2013 8:43 pm
In the manual it mentions that if you do not specify a return type that anything could return.
It also mentions you should not mix integers with pointers because of obvious issues with portability, i.e. win32 & win64 integer types and pointer sizes.
I like being able to return a pointer.
Can I really on this behaviour in PB if I am not concerned with portability?
It also mentions you should not mix integers with pointers because of obvious issues with portability, i.e. win32 & win64 integer types and pointer sizes.
I like being able to return a pointer.
Can I really on this behaviour in PB if I am not concerned with portability?
Code: Select all
Structure AA
I.i
EndStructure
Global NewList AAList.AA()
Procedure MakeAA(I.i)
Global AAList
AddElement(AAAList()): AAList()\I = I
ProcedureReturn AAList()
EndProcedure
*Ass.Ass = MakeAA(12)
Debug *AA\I