_ function

BlitzMax Forums/BlitzMax Programming/_ function

I was just thinking, does anyone have/use a function with the name _ ?
Function _(v:int)
' blah
End Function

_ 1

_ 2

_ 3



..this is legal code :P I dunno what to think of it. Somehow I can see potentially smart use of it, but I wouldn't know what.. ^_^

obfuscation of code is the only use I can see for it.

Function __:Int()
	Return 10
End Function
Function ___:Int()
	Return 100
End Function

Global _:Int

_ = __()+___()

Print _


I use it to deferentiate between internal fields and methods (privite) and external fields and methods (Public)

If BMax had real private/public then I would probably still use it, as it helps me keep track of which field/Methods I can access from the main program. (And when the list of member methods is aphabetical for a type, it holds them all in the same place)

I prepend underscores for the same purpose, what he's talking about is the function being only an underscore.

Oh Silly me ;o