Returning Arrays
Blitz3D Forums/Blitz3D Programming/Returning Arrays
| ||
is it possible? if so, how? if not, workaround? |
| ||
As far as i know/remember - its not possible to return arrays, you can however create container types... type intArray data[MAX_SIZE] endtype or you can simply use global arrays...and write to the one that best fits your purpose.. my b3d knowhow is rusty...but i think the answer is NO.. |
| ||
Arrays are global. You don't need to explicitly return an array from a function. Changing the array within a function changes it globally. For example:Dim a(10) For x=0 To 9 a(x)=x Next For x=0 To 9 Print a(x) Next doit() For x=0 To 9 Print a(x) Next WaitKey() End Function doit() For z=0 To 9 a(z)=7 Next End Function Was this what you were looking for? |
| ||
http://www.blitzbasic.com/Community/posts.php?topic=62912 |