Function overloading

BlitzMax Forums/BlitzMax Programming/Function overloading

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.

How about when calling functions you can tell the compiler which one to use by calling it like this:
MyType.Create(12:Float, 0.12) 'first parameter is not a float so you can tell it to convert to a float, second is a float so the compiler should know already which one this refers to
MyType.Create(12:Int, 2.4:int) 'first parameter is an integer so the :int part is not required, second parameter gets rounded


EDIT: I just realized what I posted probably didn't make too much sense. Basically you can just tell the compiler which one to call by just putting :ObjectType (:String/:Int/:Float/:Object etc) after each variable.