diff options
author | Alain Romedenne <LibreOfficiant@sfr.fr> | 2020-09-21 16:04:09 +0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2020-09-29 12:28:19 +0200 |
commit | 78dc9c1d059b48ad79620f0cc536466e701a042d (patch) | |
tree | e6f03a300d8fa4697327695da5c8f1c67b565112 /source/text/sbasic/shared/03101100.xhp | |
parent | b908b46979dcf004ee504ca95b64a0c9441a3164 (diff) |
tdf#131416 Basic Syntax Diagrams for Defxxx statements
- Basic language ref . toc additions
- Letter range option addition
- DefBool-based refactoring
Change-Id: I5744c63e9c21ad5ff2801cd03a119fd2c747fef3
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/103056
Tested-by: Jenkins
Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'source/text/sbasic/shared/03101100.xhp')
-rw-r--r-- | source/text/sbasic/shared/03101100.xhp | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/source/text/sbasic/shared/03101100.xhp b/source/text/sbasic/shared/03101100.xhp index e8b996221f..fdc15a3613 100644 --- a/source/text/sbasic/shared/03101100.xhp +++ b/source/text/sbasic/shared/03101100.xhp @@ -32,41 +32,47 @@ <bookmark_value>DefBool statement</bookmark_value> </bookmark> -<paragraph id="hd_id3145759" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03101100.xhp" name="DefBool Statement">DefBool Statement</link></paragraph> -<paragraph id="par_id3153089" role="paragraph" xml-lang="en-US">If no type-declaration character or keyword is specified, the DefBool statement sets the default data type for variables, according to a letter range.</paragraph> +<h1 id="hd_id3145759"><link href="text/sbasic/shared/03101100.xhp" name="DefBool Statement">DefBool Statement</link></h1> +<paragraph id="par_id3153089" role="paragraph">If no type-declaration character or keyword is specified, the DefBool statement sets the default data type for variables, according to a letter range.</paragraph> </section> <section id="PrefixDefCommon"> -<paragraph id="hd_id3149495" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph> -<bascode> -<paragraph id="par_id3150682" role="bascode" xml-lang="en-US">Defxxx Characterrange1[, Characterrange2[,...]]</paragraph> -</bascode> + <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> + <paragraph role="paragraph" id="par_id971587473488701"> + <image src="media/helpimg/sbasic/Defxxx_statements.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">DefType statements diagram</alt></image> + </paragraph> + <bascode> + <paragraph id="par_id3150682" role="bascode" localize="false">{DefBool|DefCur|DefDate|DefDbl|DefInt|DefLng|DefObj|DefStr|DefSng|DefVar} {char|char-char}[,...]</paragraph> + </bascode> + + <embed href="text/sbasic/shared/00000003.xhp#functparameters"/> -<paragraph id="hd_id3159201" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph> -<paragraph id="par_id3147226" role="paragraph" xml-lang="en-US"> <emph>Characterrange:</emph> Letters that specify the range of variables that you want to set the default data type for.</paragraph> -<paragraph id="par_id3149178" role="paragraph" xml-lang="en-US"> <emph>xxx:</emph> Keyword that defines the default variable type:</paragraph> -<paragraph id="par_id3150669" role="paragraph" xml-lang="en-US"> <emph>Keyword: </emph>Default variable type</paragraph> + <paragraph id="par_id3147336" role="paragraph"> <emph>char:</emph> Letter prefix that specifies default data type for variables.</paragraph> + <paragraph id="par_id3147226" role="paragraph"> <emph>char-char:</emph> Letter range prefixes that specify default data type for variables.</paragraph> </section> -<paragraph id="par_id3149233" role="paragraph" xml-lang="en-US"> <emph>DefBool:</emph> Boolean</paragraph> <section id="ExamplePrefixDefCommon"> -<paragraph id="hd_id3149762" role="heading" level="2" xml-lang="en-US">Example:</paragraph> -<bascode> -<paragraph id="par_id3156152" role="bascode" xml-lang="en-US">' Prefix definition for variable types:</paragraph> -<paragraph id="par_idm1341573120" role="bascode" localize="false" xml-lang="en-US">DefBool b</paragraph> -<paragraph id="par_idm1341571888" role="bascode" localize="false" xml-lang="en-US">DefDate t</paragraph> -<paragraph id="par_idm1341570656" role="bascode" localize="false" xml-lang="en-US">DefDbl d</paragraph> -<paragraph id="par_idm1341569424" role="bascode" localize="false" xml-lang="en-US">DefInt i</paragraph> -<paragraph id="par_idm1341568192" role="bascode" localize="false" xml-lang="en-US">DefLng l</paragraph> -<paragraph id="par_idm1341566960" role="bascode" localize="false" xml-lang="en-US">DefObj o</paragraph> -<paragraph id="par_idm1341565728" role="bascode" localize="false" xml-lang="en-US">DefVar v</paragraph> + <embed href="text/sbasic/shared/00000003.xhp#functexample"/> + <bascode> + <paragraph id="par_id3156152" role="bascode" xml-lang="en-US">' Prefix definitions for variable types:</paragraph> + <paragraph id="par_idm1341573120" role="bascode" localize="false">DefBool b</paragraph> + <paragraph id="par_idm1341571778" role="bascode" localize="false">DefCur c,k-m</paragraph> + <paragraph id="par_idm1341571888" role="bascode" localize="false">DefDate t</paragraph> + <paragraph id="par_idm1341570656" role="bascode" localize="false">DefDbl f</paragraph> + <paragraph id="par_idm1341569424" role="bascode" localize="false">DefInt i-k,N</paragraph> + <paragraph id="par_idm1341568192" role="bascode" localize="false">DefLng x-z, D</paragraph> + <paragraph id="par_idm1341566960" role="bascode" localize="false">DefObj U, o-R</paragraph> + <paragraph id="par_idm1352566960" role="bascode" localize="false">DefSng w,a</paragraph> + <paragraph id="par_idm1341676960" role="bascode" localize="false">DefStr s</paragraph> + <paragraph id="par_idm1341565728" role="bascode" localize="false">DefVar V,g,E</paragraph> </bascode> </section> <bascode> -<paragraph id="par_idm1341564496" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDefBool</paragraph> -<paragraph id="par_id3151381" role="bascode" xml-lang="en-US"> bOK=TRUE ' bOK is an implicit boolean variable</paragraph> -<paragraph id="par_idm1341561520" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> + <paragraph id="par_idm1341564496" role="bascode" localize="false">Sub ExampleDefBool</paragraph> + <paragraph id="par_id3152481" role="bascode" xml-lang="en-US"> Print TypeName(Boole), VarType(Babbage), bitcoin ' Displays: Boolean 11 False</paragraph> + <paragraph id="par_id3151381" role="bascode" xml-lang="en-US"> bOK=True ' bOK is an implicit boolean variable</paragraph> + <paragraph id="par_idm1341561520" role="bascode" localize="false">End Sub</paragraph> </bascode> -</body> +</body> </helpdocument> |