How can I get array-data back from a procedure? I've read somewhere that I should give it back through input/output arguments or something like that?
Would anybody like to share an example?
Return array from procedure?
Re: Return array from procedure?
http://www.purebasic.com/documentation/ ... dures.html
Code: Select all
;Example: Array as parameter
Dim Table.Point(10, 15)
Table(0,0)\x = 1
Table(1,0)\x = 2
Procedure TestIt(c.l, Array ParameterTable.Point(2)) ; The table support 2 dimensions
ParameterTable(1, 2)\x = 3
ParameterTable(2, 2)\x = 4
EndProcedure
TestIt(10, Table())
MessageRequester("Table", Str(Table(1, 2)\x))
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum