Pernyataan Type

Tetapkan struktur data non-UNO.

Struktur Type adalah koleksi ruas data terurut, yang dapat dimanipulasi sebagai butir tunggal.

Sintaksis:


         Type struct_name
             DataField1 As TypeName1
             DataField2 As TypeName2
             (...)
         End Type ' struct_name
     
note

A Type structure scope is that of the module it belongs to.


Contoh:


         Type Customer
             Name1 As String
             City As String
         End Type ' Customer structure
         Sub setCustomer
             Dim oCustomer as New Customer
             oCustomer.Name1 = "The Document Foundation"
             oCustomer.City = "Berlin"
         End Sub
     
tip

Enumerasi dapat dibuat menggunakan definisi pernyataan Type. Memanggil Skrip Python dari Basic menggambarkan mekanisme tersebut.