? Returning arrays with OUT. ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Returning arrays with OUT.

I used to think it wasn't possible to return arrays with OUT. DEF TEST OUT ARRAY DIM ARRAY[10] 'error: duplicate variable END However, all you need to do is use =... DEF TEST OUT ARRAY DIM ARRAY2[10] ARRAY=ARRAY2 END Note that this will not work: DEF TEST ARRAY DIM ARRAY2[0] ARRAY=ARRAY2 END (It would work if ARRAY2 was global or if ARRAY is set using the return of another function)
Author
12Me21
Updated
Rating
0 votes
Categories
Keywords
  • array
  • return
  • arrays
  • out
  • function
  • def
0 Comment(s)