Default values in Global Function declarations?

BlitzMax Forums/BlitzMax Programming/Default values in Global Function declarations?

JoshK(Posted 2007) [#1]
When declaring functions for use with DLL's, it would be nice to be able to do this:

Global CreateEmitter:Int(intensity=50,parent=0)



H&K(Posted 2007) [#2]
Well you can, cannot you?

As long as CreateEmitter returns a value. SO just wrap a SetDefaultCreateEmitter:Flag(50,NULL)


Koriolis(Posted 2007) [#3]
Well you can, cannot you?
No you can't.
He's asking to be be able to have default parameters on function pointers variables. Right now you need to simulate it manually by example like this:
Global CreateEmitter_:Int(intensity,parent)
Function CreateEmitter:Int(intensity=50,parent=0)
    Return CreateEmitter_(intensity, parent)
End Function