Problem with OOP

BlitzMax Forums/BlitzMax Programming/Problem with OOP

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.

Here's a dodgy example:
Type mytype Extends Object
  Field blah
End Type
Type myothertype Extends Object
  Field jugglies
End Type
type1:mytype=New mytype
type2:myothertype=New myothertype

Function stuff(whatever:Object)
  If mytype(whatever) then Print "mytype was passed!"
  If Int(whatever) then Print "Integer was passed!"
End Function

stuff("passing a string will do nothing in this example")
stuff(type1)

Anyway I think that's how it works, I can't remember exactly off the top of my head and can't find any quick documentation (suprise surprise) to back it up :)