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.

Kistjes: Your version is good as long as you never want to set and save the old value in one hit.

For example:

local oldvalue = myType.name( "newvalue" )
print oldvalue


It is very handy when you want to save a value temporarily and put it back the way it was later. Colour is a good example.

Also, the "unused" string is only unused if you never get the value. In which case it's pointless using this method which is by definition a GetSet.