git @ Cat's Eye Technologies Dipple / master vbscript / class.vbs
master

Tree @master (Download .tar.gz)

class.vbs @masterraw · history · blame

' SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
' For more information, please refer to <https://unlicense.org/>
' SPDX-License-Identifier: Unlicense

Option Explicit

Dim a

Private Sub Hello(x)
    msgbox "Welcome to " + x + "!"
End Sub

Class Foo
    private tape()

    Public Sub Class_Initialize()
        ReDim tape(100)
    End Sub

    Public Property Let Identity(x)
        tape(99) = x
    End Property

    Public Property Let Marf(num,x)
        tape(num) = x
    End Property

    Public Property Get Identity()
        Identity = tape(99)
    End Property

    Public Function GetId()
        GetId = tape(99)
    End Function
End Class

Set a = New Foo
a.Identity = "foobar"
Hello a.GetId
a.Marf(99) = "marf"
Hello a.Identity