Type Overide
BlitzMax Forums/BlitzMax Programming/Type Overide
| ||
Is there anyway to override a type with the same name? |
| ||
More or less... If the previous type is on a module, all you have to do is create a type with the same name. You can reffer to the module type by using it's complete path (as instance: brl.linkedlist.tlist) |
| ||
No. Why do you think you'd want to try to do this? |
| ||
no and yes. if type is in module then it is possible. example: SuperStrict Type TStream Field a:Int = 1 End Type Print New TStream.a this will override original TStream type also you can override bmax functions example: Function Print(text:string) brl.standardio.Print "My print function = " + text End Function Print("Hello world!") |
| ||
Wouldn't it be better to abstract, extend, and over-ride the methods/functions in the original one? |