From efc72a00693af420979735313b57eced9ac0fbaa Mon Sep 17 00:00:00 2001 From: LibreOļ¬ƒciant Date: Wed, 13 Nov 2019 11:16:11 +0200 Subject: LibO Type statement extends enumerations to all data types. Change-Id: I8574a5c9290071c96618b1cb1aadc26068abd2b1 Reviewed-on: https://gerrit.libreoffice.org/82571 Tested-by: Jenkins Reviewed-by: Olivier Hallot (cherry picked from commit 2647b00f50bee666a7e23bb5f8471269d03b41c9) Reviewed-on: https://gerrit.libreoffice.org/83494 --- source/text/sbasic/shared/03090413.xhp | 31 ++++++++++++++++--------------- source/text/sbasic/shared/enum.xhp | 13 ++++++------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/source/text/sbasic/shared/03090413.xhp b/source/text/sbasic/shared/03090413.xhp index 05bb3f292c..2956f7e8f6 100644 --- a/source/text/sbasic/shared/03090413.xhp +++ b/source/text/sbasic/shared/03090413.xhp @@ -31,30 +31,31 @@ Type statement Type Statement - Define non-UNO data structures (structs). + Define non-UNO data structures. - A struct is an ordered collection of data fields, that can be manipulated as a single item. + A Type structure is an ordered collection of data fields, that can be manipulated as a single item. - Type StructName - DataField1 As TypeName1 - DataField2 As TypeName2 - (...) - End Type + Type struct_name + DataField1 As TypeName1 + DataField2 As TypeName2 + (...) + End Type ' struct_name + A Type structure scope is that of the module it belongs to. - REM ***** BASIC ***** - Type customer - Name1 As String - City As String - End Type + 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" + 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
diff --git a/source/text/sbasic/shared/enum.xhp b/source/text/sbasic/shared/enum.xhp index e56b335d12..8ba2d7901f 100644 --- a/source/text/sbasic/shared/enum.xhp +++ b/source/text/sbasic/shared/enum.xhp @@ -14,26 +14,25 @@ /text/sbasic/shared/enum.xhp - Enum statement constant groups enumerations -

Enum Statement [VBA]

Define enumerations or non UNO constant groups. An enumeration is a value list that facilitates programming and eases code logic review.
- Enum
- Object Statement block
- End Enum + + Enum list_name
+ ' Object Statement block + End Enum ' list_name +

Parameters:

Within a given enumeration, fit together values that logically relate to one another. - Option VBASupport 1
@@ -58,7 +57,7 @@ Print .MACINTOSH, .MOTIF, .OPENLOOK, .OS2PM, .W1ND0WS End With
- + Enumerations can be extended to other data types using Type statement definitions. Calling Python Scripts from Basic illustrates that mechanism.
Const statement, constants Option VBASupport statement -- cgit v1.2.3