diff options
author | LibreOfficiant <LibreOfficiant@sfr.fr> | 2020-04-27 14:11:43 +0100 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2020-05-04 16:16:43 +0200 |
commit | 115422426e5c514b05d8f64afa27141bb9ef1ae0 (patch) | |
tree | a5af57502b087e3b3dd6356a933a7ddc30380185 /source/text/sbasic/shared/property.xhp | |
parent | b2f0c674155a29174fca5acfa0c4036c3320fc6c (diff) |
tdf#131416 Basic Subroutines help pages
- Function, Property & Sub statements
- Public, Private are keywords, Global removed from diagrams:
- Global=Public as Basic libraries remain in memory
- Basic toc & index
Change-Id: If107f4d148b4da399dd03d1b18ea3da5454bb9ac
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/92784
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'source/text/sbasic/shared/property.xhp')
-rw-r--r-- | source/text/sbasic/shared/property.xhp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/source/text/sbasic/shared/property.xhp b/source/text/sbasic/shared/property.xhp index 1138716fde..31a4897151 100644 --- a/source/text/sbasic/shared/property.xhp +++ b/source/text/sbasic/shared/property.xhp @@ -27,15 +27,39 @@ <bookmark branch="index" id="N0181"> <bookmark_value>Property statement</bookmark_value> </bookmark> + <h1 id="N0182">Property Statement</h1> <paragraph role="paragraph" id="N0183">A property, also called field or attribute, characterizes a given object or piece of information. Properties can be used to control access to data. It is common use to include instructions at setting or reading time of properties. Code can vary from simple assignment to complex context dependant routines. Using <emph>Get</emph>, <emph>Let</emph> or <emph>Set</emph> accessers enforces properties' consistency when necessary.</paragraph> <warning id="N0184">This statement requires <link href="text/sbasic/shared/compatible.xhp" name ="Option Compatible">Option Compatible</link> to be placed before the executable program code in a module. </warning> - <h2 id="N0185">Syntax</h2> + + <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> + <paragraph role="paragraph" id="par_id971587473488701"> + <image src="media/helpimg/sbasic/Property-Get_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Property Get Statement diagram</alt></image> + </paragraph> <bascode> - <paragraph role="bascode" localize="false" id="N0186">[Global | Private | Public] Property [Get | Let | Set] propName[([Optional [ByRef | ByVal]]value As Typename)] [As Typename]</paragraph> + <paragraph role="bascode" localize="false" id="N0185">[Private | Public] Property Get name[char | As typename]</paragraph> + <paragraph role="bascode" localize="false" id="N0185b">End Property</paragraph> + </bascode> + + <paragraph role="paragraph" id="par_id972787473488701"> + <image src="media/helpimg/sbasic/Property-Set_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Property Set Statement diagram</alt></image> + </paragraph> + <bascode> + <paragraph role="bascode" localize="false" id="N0186">[Private | Public] Property [Let | Set] name[char] [([Optional [ByRef | ByVal]]value[char | As typename])] [As typename]</paragraph> <paragraph role="bascode" localize="false" id="N0187">End Property</paragraph> </bascode> - <h2 id="N0188">Examples</h2> + + <embed href="text/sbasic/shared/00000003.xhp#functparameters"/> + <paragraph role="paragraph" id="par_id941588582710020"> <emph>name: </emph>The property name.</paragraph> + + <paragraph id="par_id3147229" role="paragraph" xml-lang="en-US"> <emph>argument:</emph> Value to be passed to the <literal>Property</literal> setter routine.</paragraph> + <note id="par_id301588583826717"><literal>Property</literal> setters often use a single argument. Multiple arguments are equally accepted.</note> + + <embed href="text/sbasic/shared/fragments.xhp#argument"/> + <embed href="text/sbasic/shared/fragments.xhp#typename"/> + <embed href="text/sbasic/shared/fragments.xhp#char"/> + + <h2 id="N0188">Examples</h2> <bascode> <paragraph role="bascode" localize="false" id="N0189">Option Compatible</paragraph> <paragraph role="bascode" localize="false" id="N0190">Sub Main</paragraph> |