How to create New array of function pointers?

BlitzMax Forums/BlitzMax Programming/How to create New array of function pointers?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Ok. I'm not trying to clear the array. I just have a trend throughout my code to define all the Fields without saying what they contain, so MyFunctions()[] to start out with. Then for the New() method, I am also not defining what they contain, I am just initializing the data to Null and 0 or whatever represents a non-initialized state. Then in my own method I want to set up whatever size the array should be based on a value passed from somewhere else. ie.

Method MyMethod(MSize:Int)
'set up the array to that size
End Method

As to the other suggestion, how could I define it as a New Int() [Size] and it still be considered an array of function pointers? Blitz wont accept that as valid syntax.

However, based on your concept, Perturbatio, the following actually works:

Method MyMethod(MSize:Int)
      MyFunctions=MyFunctions[0..MSize]    'Resize it as a slice
End Method


Thanks!