True, you could call a abstracted method, but eh :)
Mark, I suppose this isnt possible with base types?
:( can't convert object to byte. this is one situation in which neither polymorphism or mark's method can help me. Guess I'll just have to make a bunch of them.
BTW, Blitzmax needs overriding of functions and methods!
Mark, I suppose this isnt possible with base types?
Method Poke(offset:Int,o:Object) If Byte(o) If offset>BankSize(Thebank)-1 Then If offset+1-AutoResizeLimit>BankSize(Thebank) then Throw "In the poke method of type Bank, attempted to write a byte "+(offset+1-BankSize(Thebank))+" bytes away from the limits of the bank, which is farther than the allowed distance of "+AutoResizeLimit+", for auto resizing. This implies somethings gone wrong and you may be using a value in the incorrect parameter." Else ResizeBank(Thebank,offset+1) Endif EndIf PokeByte(Thebank,offset,Byte o) ElseIf Short(o) PokeShort(Thebank,offset,Short o) ElseIf Int(o) PokeInt(Thebank,offset,Int o) ElseIf Long(o) PokeLong(Thebank,offset,Long o) ElseIf Float(o) PokeFloat(Thebank,offset,Float o) ElseIf Double(o) PokeDouble(Thebank,offset,Double o) Endif EndMethod
:( can't convert object to byte. this is one situation in which neither polymorphism or mark's method can help me. Guess I'll just have to make a bunch of them.
BTW, Blitzmax needs overriding of functions and methods!