From d1fdd2270aa5d6b5c3ac6b608a04b9e8eb3f3e6f Mon Sep 17 00:00:00 2001 From: LibreOļ¬ƒciant Date: Fri, 10 Apr 2020 10:38:11 +0100 Subject: tdf#131416 Basic syntax diagrams reusable fragments - a new help page to aggregate all fragments - reusable fragments as media/helpimg's Change-Id: If28747a75bbbd14ae8a0cc04bdedb8b7d81f173b Reviewed-on: https://gerrit.libreoffice.org/c/help/+/92009 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- source/media/helpimg/sbasic/Type_statement.svg | 54 +++++++++++++++++ source/media/helpimg/sbasic/argument_fragment.svg | 63 ++++++++++++++++++++ source/media/helpimg/sbasic/array_fragment.svg | 45 ++++++++++++++ source/media/helpimg/sbasic/type-car_fragment.svg | 38 ++++++++++++ source/media/helpimg/sbasic/type-name_fragment.svg | 42 +++++++++++++ source/text/sbasic/shared/fragments.xhp | 69 ++++++++++++++++++++++ 6 files changed, 311 insertions(+) create mode 100644 source/media/helpimg/sbasic/Type_statement.svg create mode 100644 source/media/helpimg/sbasic/argument_fragment.svg create mode 100644 source/media/helpimg/sbasic/array_fragment.svg create mode 100644 source/media/helpimg/sbasic/type-car_fragment.svg create mode 100644 source/media/helpimg/sbasic/type-name_fragment.svg create mode 100644 source/text/sbasic/shared/fragments.xhp (limited to 'source') diff --git a/source/media/helpimg/sbasic/Type_statement.svg b/source/media/helpimg/sbasic/Type_statement.svg new file mode 100644 index 0000000000..c1fab324a3 --- /dev/null +++ b/source/media/helpimg/sbasic/Type_statement.svg @@ -0,0 +1,54 @@ + + + + + +Type +struc_name + + +datafield + + + +Variant + + + +array +As +type-name + +type-car + + +array + +End Type \ No newline at end of file diff --git a/source/media/helpimg/sbasic/argument_fragment.svg b/source/media/helpimg/sbasic/argument_fragment.svg new file mode 100644 index 0000000000..e6d09bab3a --- /dev/null +++ b/source/media/helpimg/sbasic/argument_fragment.svg @@ -0,0 +1,63 @@ + + + + + + + + + +Optional + + + +ByRef +ByVal +ParamArray +argument + + + + +As +type-name +type-car + + + += +expression + + + +() + + +As Variant \ No newline at end of file diff --git a/source/media/helpimg/sbasic/array_fragment.svg b/source/media/helpimg/sbasic/array_fragment.svg new file mode 100644 index 0000000000..95b3827d02 --- /dev/null +++ b/source/media/helpimg/sbasic/array_fragment.svg @@ -0,0 +1,45 @@ + + + + + +( + + + + + + + +start +To +end +, +) \ No newline at end of file diff --git a/source/media/helpimg/sbasic/type-car_fragment.svg b/source/media/helpimg/sbasic/type-car_fragment.svg new file mode 100644 index 0000000000..db648bbdd8 --- /dev/null +++ b/source/media/helpimg/sbasic/type-car_fragment.svg @@ -0,0 +1,38 @@ + + + + + + +& +% +! +# +$ \ No newline at end of file diff --git a/source/media/helpimg/sbasic/type-name_fragment.svg b/source/media/helpimg/sbasic/type-name_fragment.svg new file mode 100644 index 0000000000..d469b104e8 --- /dev/null +++ b/source/media/helpimg/sbasic/type-name_fragment.svg @@ -0,0 +1,42 @@ + + + + + + +Double +Single +Long +Integer +Variant +Object +Currency +Date +String \ No newline at end of file diff --git a/source/text/sbasic/shared/fragments.xhp b/source/text/sbasic/shared/fragments.xhp new file mode 100644 index 0000000000..416149a86e --- /dev/null +++ b/source/text/sbasic/shared/fragments.xhp @@ -0,0 +1,69 @@ + + + + + + Basic syntax diagrams fragments + /text/sbasic/shared/fragments.xhp + + + +
+

Syntax fragments

+ %PRODUCTNAME Basic syntax fragments. +
+ +
+

+ argument fragment + + {[Optional [ByRef|ByVal]]|ParamArray} argument {{As type-name|type-car}[ = expression]|[()]As Variant} + + + Optional: The argument is not mandatory. + ByRef: The argument is passed by reference. ByRef is the default. + ByVal: The argument is passed by value. Its value can be modified by the called routine. + type-car: Type declaration caracter. + type-name: Primitive data type name. Library or module defined types can also be specified. + = expression: Specify a default value for the argument, matching its declared type. Optional is necessary for each argument specifying a default value. + ParamArray: Use ParamArray when the number of parameters is undetermined. A typical scenario is that of a Calc user-defined function. Using ParamArray should be limited to the last argument of a routine. + UsingParamArray or = expression require Option Compatible to be placed before the executable program code in a module. +
+ +
+

+ array fragment + + ( [[start To] end], .. ) + + + start: Lower bound of a dimension. + end: Upper bound of a dimension. + Multiple dimensions for an array are denoted using comma (,) sign. +
+ +
+

+ data types fragment + + {Currency|Date|Double|Integer|Long|Object|Single|String|Variant} + +
+ +
+

+ type declaration caracters + + { % | & | ! | # | $ } + +
+ + +
\ No newline at end of file -- cgit