Call Base Statement

Lets a constructor in a derived class call a constructor in a base class.

Syntax

Call Base [ argument_list ]

Parts

argument_list
Optional – One or more expressions, with a comma between each one. You can put rounded brackets around the list, if that is your style.

Instructions

Examples

Class BaseClass
   Var a As Int, b As Real
   Constructor
      a = 0
      b = 0.0
   End Constructor
   Constructor x As Int, y As Real
      a = x
      b = y
   End Constructor
End Class

Class DerivedClass Is BaseClass
   Constructor
      Call Base
   End Constructor
   Constructor a As Int, b As Real
      Call Base a, b
   End Constructor
End Class

See also