If you only have an F95 compiler without all the 2003/2008 bits, this is how it can be done.
MODULE ObjMod
IMPLICIT NONE
TYPE ObjType
INTEGER, PRIVATE :: var
END TYPE ObjType
CONTAINS
SUBROUTINE ObjCreate(this)
TYPE(ObjType), POINTER :: this
allocate(this)
END SUBROUTINE ObjCreate
SUBROUTINE ObjDelete(this)
TYPE(ObjType), POINTER :: this
deallocate (this)
END SUBROUTINE ObjDelete
SUBROUTINE ObjSet(this, value)
TYPE(ObjType), INTENT(inout) :: this
INTEGER, INTENT(in) :: value
this%var = value
END SUBROUTINE ObjSet
INTEGER FUNCTION ObjGet(this)
TYPE(ObjType), INTENT(inout) :: this
ObjGet = this%var
END FUNCTION ObjGet
END MODULE ObjMod
PROGRAM test
USE ObjMod
IMPLICIT NONE
TYPE (ObjType), POINTER :: testObj
CALL ObjCreate(testObj)
CALL ObjSet(testObj, 12)
PRINT*, ObjGet(testObj)
CALL ObjDelete(testObj)
STOP
END PROGRAM test
I also used to code like that in C in the early 80s before a decent C++ compiler came out. What you will find is that many systems written in the 70s up to the early 90s use this technique. It will work in any language that supports structures and dynamic memory allocation.