idea for the next blitz3d update: function(array)
Blitz3D Forums/Blitz3D Programming/idea for the next blitz3d update: function(array)
| ||
H! Maybe this is possible in the next blitz3D update (I want to use it sometimes, and I use it in php) Dim array$(255) array$(0) = "hoi" array$(1) = "hello" Afunction(array$) ;< this ;instead of Afunction(array$(0),array$(1),etc) That's all, no, I mean That's the only thing :) |
| ||
I understand what you mean, but in blitz you dont need to do that because all arrays must be global anyway. so you you can access them directly from any part of your program. Having said that, you _could_ encapsulate the array inside a type and then pass the type to the function. type myArray field values[10] end type although you can only have a single dimension in the array within a type and as with all arrays in blitz the array size must be constant. no REDIM allowed :( ReDim would be more useful IMHO allowing us to re-size arrays at run time. |
| ||
Do you mean like this? (try it!):Local array$[255] array[0] = "hoi" array[1] = "hello" Afunction(array) ;< this Function Afunction(arr$[255]) ;stuff here End Function |