From 44640598eda121aa83d4e89b874579d90f00e6fb Mon Sep 17 00:00:00 2001 From: LibreOļ¬ƒciant Date: Wed, 22 Apr 2020 16:40:44 +0100 Subject: tdf#36737 Clarify routine arguments initialisation in those contexts: - native LibreOffice Basic - w/ Option Compatible - w/ Option VBASupport 1/0 - Added missing Byte, Boolean datatypes - type declaration caracters fragment conciser layout Change-Id: I53387018223466ef7452d87fb166d5d9e6de0594 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/92540 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- source/media/helpimg/sbasic/type-car_fragment.svg | 17 ++++++++--------- source/text/sbasic/shared/fragments.xhp | 7 ++++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/source/media/helpimg/sbasic/type-car_fragment.svg b/source/media/helpimg/sbasic/type-car_fragment.svg index db648bbdd8..8bc73c93ed 100644 --- a/source/media/helpimg/sbasic/type-car_fragment.svg +++ b/source/media/helpimg/sbasic/type-car_fragment.svg @@ -1,4 +1,4 @@ - + - - - -& -% -! -# -$ \ No newline at end of file + + +% +& +! +# +$ \ No newline at end of file diff --git a/source/text/sbasic/shared/fragments.xhp b/source/text/sbasic/shared/fragments.xhp index 74974886e8..a0ab0b5753 100644 --- a/source/text/sbasic/shared/fragments.xhp +++ b/source/text/sbasic/shared/fragments.xhp @@ -32,9 +32,10 @@ ByVal: The argument is passed by value. Its value can be modified by the called routine. type-car: Type declaration character. 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. + = 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. + UsingParamArray or = expression require Option Compatible to be placed before the executable program code in a module. + When using Option VBASupport 1, Optional arguments with no default value (= expression) are initialized according to their data type, except if Variant.
@@ -53,7 +54,7 @@

type-name fragment

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