You can define classes. A class is a kind of template, it is not used directly. To use it, a copy of it is made. This copy is called an object. You can make different objects of the same class.
A class is a datatype, so the declaration of the object looks like a normal declaration of a variable:
object_name AS Class_name
but an object has to be instantiated with NEW:
object_name = NEW Class_name
You can "recycle" your classes in different projects.
The class CCar.class, which is used here, is used in the following chapters also:
How to make more objects of a class.
PUBLIC car AS CCar'this declares a variable of the type "CCar"
STATIC PUBLIC SUB Main() DIM hForm AS Fmain hForm = NEW Fmain hForm.show END PUBLIC SUB _new()'here, the variable car is instantiated
car = NEW CCar("mercedes", 400) car.setPrice(5064.67) END PUBLIC SUB Button1_Click() TextLabel1.Text= car.getBrand() & "<br>" & Str(car.getPS_Power()) & "<br>" & Str(car.getPrice())'to use a method of car the following syntax has to be used:
END