diff options
Diffstat (limited to 'helpcontent2/source/text/sbasic/shared/03101100.xhp')
-rw-r--r-- | helpcontent2/source/text/sbasic/shared/03101100.xhp | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/helpcontent2/source/text/sbasic/shared/03101100.xhp b/helpcontent2/source/text/sbasic/shared/03101100.xhp new file mode 100644 index 000000000..811494ccb --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03101100.xhp @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<helpdocument version="1.0"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . +--> + +<meta> + <topic id="textsbasicshared03101100xml" indexer="include" status="PUBLISH"> + <title id="tit" xml-lang="en-US">DefBool Statement</title> + <filename>/text/sbasic/shared/03101100.xhp</filename> + </topic> +</meta> + +<body> + +<section id="defbool"> +<bookmark xml-lang="en-US" branch="index" id="bm_id3145759"> + <bookmark_value>DefBool statement</bookmark_value> +</bookmark> + +<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"> + <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|DefErr|DefInt|DefLng|DefObj|DefStr|DefSng|DefVar} {char|char-char}[,...]</paragraph> + </bascode> + + <embed href="text/sbasic/shared/00000003.xhp#functparameters"/> + + <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> + +<section id="ExamplePrefixDefCommon"> + <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,l-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_idm1341570656" role="bascode" localize="false">DefErr e</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</paragraph> +</bascode> +</section> +<bascode> + <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> +</helpdocument> |