GLBasic forum

Main forum => GLBasic - en => Topic started by: MrTAToad on 2009-Mar-05

Title: Over-ridables
Post by: MrTAToad on 2009-Mar-05
Whilst CALLBACK allows over-ridables for difference include files, it would be nice if this sort of thing could be done when all the functions are in the same include file :)

At the moment, the compiler complains if there are more than two functions with the same name.
Title: Re: Over-ridables
Post by: Kitty Hello on 2009-Mar-05
you mean over LOADING (2 different argument types).
Call the functions differently:
swapi, swapd, swaps e.g.
Title: Re: Over-ridables
Post by: MrTAToad on 2009-Mar-05
Yes - overloading is what I'm after here :)

Whilst I use different function names, it would be nice to use just one and let the compiler work out the correct function to call...
Title: Re: Over-ridables
Post by: Kitty Hello on 2009-Mar-05
it's going to cause a lot of confusion IMO. It's not very "BASIC".