In Blitz3D do all arrays have to be created inside the main part of the program? I just tried to create one in a function and it said array doesn't exist?
Can't Dim an array inside a Function?
Blitz3D Forums/Blitz3D Beginners Area/Can't Dim an array inside a Function? standard arrays are always global. You can define "Blitz Arrays" inside a function. Just define them as a local variable and use square brackets. EG:
Local TempArray[100]
It's an undocumented command, but it's unlikely to be removed because many, many people use them.
Check here for more of an explanation:
http://www.blitzcoder.com/cgi-bin/code/code_showentry.pl?id=thechange09052002191420&comments=no
Local TempArray[100]
It's an undocumented command, but it's unlikely to be removed because many, many people use them.
Check here for more of an explanation:
http://www.blitzcoder.com/cgi-bin/code/code_showentry.pl?id=thechange09052002191420&comments=no
Thanks !
Yeah I realised arrays are global, just wanted a way to make and delete one inside a function though for resource-efficiency.