FUNCTION PBMAIN() AS LONG
  LOCAL o AS OBJECT
  LOCAL r AS LONG
  r = 0

  ' Uninitialized object should be nothing
  IF ISOBJECT(o) THEN r = 1
  IF ISNOTHING(o) = 0 THEN r = 2

  ' Assign null pointer
  o = 0
  IF ISOBJECT(o) THEN r = 3

  ' NOTHING keyword
  o = NOTHING
  IF ISOBJECT(o) THEN r = 6

  ' Assign a non-zero pointer value (just an integer cast)
  o = 1234
  IF ISNOTHING(o) THEN r = 4
  IF OBJPTR(o) <> 1234 THEN r = 5

  IF r = 0 THEN FUNCTION = 1 ELSE FUNCTION = r + 1
END FUNCTION
