From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../source/text/sbasic/shared/03090413.xhp | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 helpcontent2/source/text/sbasic/shared/03090413.xhp (limited to 'helpcontent2/source/text/sbasic/shared/03090413.xhp') diff --git a/helpcontent2/source/text/sbasic/shared/03090413.xhp b/helpcontent2/source/text/sbasic/shared/03090413.xhp new file mode 100644 index 000000000..38c6709ae --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03090413.xhp @@ -0,0 +1,69 @@ + + + + + + + Type Statement + /text/sbasic/shared/03090413.xhp + + + + +
+ + Type statement + +

Type Statement

+ Define non-UNO data structures. +
+ A Type structure is an ordered collection of data fields, that can be manipulated as a single item. + + Type statement diagram + + 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. + + A Type structure scope is that of the module it belongs to. + + + 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. +
+ + CreateObject function +
+ +
-- cgit v1.2.3