Is type not extended...

BlitzMax Forums/BlitzMax Programming/Is type not extended...

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.

So this is the obvious solution:

class Bob:
  pass
  
class Jim(Bob):
  pass

def IsThisJustABob(o):
  return o.__class__.__name__ == "Bob"

a = Bob()
b = Jim()

print IsThisJustABob(a)
print IsThisJustABob(b)


oops ... this is Python.

PS: sorry, simply couldn't resist. Sorry for any inconvenience.