Skip to content

Properties & Methods

Classes define properties (fields) to hold data, and methods (Subs/Functions) to operate on that data.

Properties

  • Declared inside a class with Dim or Var.
  • Accessed and assigned via dot-notation.
Class Person
  Dim Name As String
  Dim Age  As Integer
End Class

Var alice As New Person
alice.Name = "Alice"
alice.Age  = 30

Built-in classes expose properties too:

Dim inst As New MyInstance()
inst.Value = 42.2        // plugin property :contentReference[oaicite:2]{index=2}:contentReference[oaicite:3]{index=3}

Methods

  • Sub for procedures (no return), Function for value-returning.
  • Defined inside Class…End Class.
  • Invoked via object.MethodName(...).
Class Person
  Sub SayHello()
    Print("Hello, " + Name)
  End Sub
End Class

alice.SayHello()  // prints "Hello, Alice"