LibreOffice 7.4 Hjelp
Definer ikke-UNO-datastrukturer.
En Typestruktur er en ordnet samling av datafelt, som kan manipuleres som et enkelt element.
Type struct_name
DataField1 As TypeName1
DataField2 As TypeName2
(...)
End Type ' struct_name
Extended types such as Type statement structures, UNO objects or ClassModule objects are valid typenames.
Et Typestruktur-omfang er det for modulen det tilhører.
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
Enumerations can be created using Type statement definitions. Calling Python Scripts from Basic illustrates that mechanism.