Skip to content

Class

Used to define a class. Classes are templates from which objects are created -- classes are object types, as opposed to value types. Objects are held by reference and are reference-counted. The memory an object occupies is freed when there are no more references to it -- when no variables in the process refer to them.

Syntax:

[ attributes ]
Class name
    [ classmember ]
    [ classmember ] ...
End Class

attributes : optional One or more of:
ArrayBoundsChecks, ClassId, COMCreatable, CustomControl, Description, FloatingPointErrorChecks, FormDesignerId, Hidden, IntegerOverflowChecks, PredeclaredID

name : The identifier naming the class.

classmember : optional Any of the following:

  • constant defined using Const,
  • variable defined using Public, Protected, Private, and Dim,
  • procedure defined using Sub, Function and Property,
  • user-defined type (UDTs) defined using Type.

twinBASIC and LOGO copyright of "WaynePhillipsEA" author