Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

PureGDK / Object-oriented programming in PureBasic

Retired Moderator
Years of Service
User Offline
Joined: 9th Nov 2005
Posted: 16th Oct 2009 01:48 Edited at: 17th Oct 2009 01:50
Although PureBasic is a procedural language it provides support for object-oriented programming through the use of interfaces.

Consider this example which illustrates how to create a rectangle object of with the methods Draw() and Delete():

Detailed information can be found in Stephen Rodriguez's OOP tutorial:

Additionally, there are various OOP precompilers which can automate much of this by encapsulating the process in familiar keyword blocks such as "Class":

Login to post a reply

Server time is: 2020-10-27 15:43:17
Your offset time is: 2020-10-27 15:43:17