summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/sbasic/shared/03040000.xhp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--helpcontent2/source/text/sbasic/shared/03040000.xhp356
1 files changed, 356 insertions, 0 deletions
diff --git a/helpcontent2/source/text/sbasic/shared/03040000.xhp b/helpcontent2/source/text/sbasic/shared/03040000.xhp
new file mode 100644
index 000000000..0bcdb47e9
--- /dev/null
+++ b/helpcontent2/source/text/sbasic/shared/03040000.xhp
@@ -0,0 +1,356 @@
+<?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="textsbasicshared03040000xml">
+ <title id="tit" xml-lang="en-US">Basic Constants</title>
+ <filename>/text/sbasic/shared/03040000.xhp</filename>
+ </topic>
+ </meta>
+
+ <body>
+ <section id="basic_constants">
+ <bookmark xml-lang="en-US" branch="index" id="bm_id051720170831387233">
+<bookmark_value>Basic constants</bookmark_value>
+ </bookmark>
+ <paragraph id="hd_id051620171022255424" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03040000.xhp">Basic Constants</link></paragraph>
+ <paragraph id="par_id051620171022384640" role="paragraph" xml-lang="en-US"><ahelp hid=".">Constants used in Basic programs</ahelp></paragraph>
+ </section>
+
+ <section id="booleanconstants">
+ <bookmark xml-lang="en-US" branch="index" id="bm_id871554200620243">
+<bookmark_value>Boolean Basic constants</bookmark_value>
+<bookmark_value>Basic constant;False</bookmark_value>
+<bookmark_value>Basic constant;True</bookmark_value>
+ </bookmark>
+ <h2 id="par_id051620171022382581">Boolean constants</h2>
+
+ <table id="tbl_051620171030174631">
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id051620171114565335" role="tablehead" xml-lang="en-US">Name</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114565484" role="tablehead" xml-lang="en-US">Type</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114563271" role="tablehead" xml-lang="en-US">Value</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id051620171114567378" role="paragraph" localize="false" xml-lang="en-US">True</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114563299" role="paragraph" localize="false" xml-lang="en-US">Boolean</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114565603" role="paragraph" localize="false" xml-lang="en-US">1</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id051620171114564178" role="paragraph" localize="false" xml-lang="en-US">False</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114566455" role="paragraph" localize="false" xml-lang="en-US">Boolean</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114563986" role="paragraph" localize="false" xml-lang="en-US">0</paragraph>
+ </tablecell>
+ </tablerow>
+ </table>
+
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph id="par_id051620171114567539" role="bascode" localize="false">Dim bPositive as Boolean</paragraph>
+ <paragraph id="par_id051620171114574976" role="bascode" localize="false">bPositive = True</paragraph>
+ </bascode>
+ </section>
+
+ <section id="mathconstants">
+ <bookmark xml-lang="en-US" branch="index" id="bm_id131554200364170">
+<bookmark_value>Basic Mathematical constants</bookmark_value>
+<bookmark_value>Pi;Basic constant</bookmark_value>
+<bookmark_value>Basic constant;Pi</bookmark_value>
+ </bookmark>
+
+ <h2 id="hd_id051620171114573549">Mathematical constant</h2>
+
+ <table id="tbl_051620171031298215">
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id051620171114576150" role="tablehead" xml-lang="en-US">Name</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114575122" role="tablehead" xml-lang="en-US">Type</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114574987" role="tablehead" xml-lang="en-US">Value</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id051620171114574028" role="paragraph" localize="false">Pi</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114571506" role="paragraph" localize="false">Double</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114576361" role="paragraph" localize="false">3.14159265358979</paragraph>
+ </tablecell>
+ </tablerow>
+ </table>
+
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph id="par_id051620171114575849" role="bascode" localize="false">Function Rad2Deg( aRad as Double) As Double</paragraph>
+ <paragraph id="par_id051620171114575132" role="bascode" localize="false"> Rad2Deg = aRad * 180.00 / Pi</paragraph>
+ <paragraph id="par_id051620171114571381" role="bascode" localize="false">End Function</paragraph>
+ </bascode>
+ </section>
+
+ <section id="objectconstants">
+ <bookmark xml-lang="en-US" branch="index" id="bm_id261554201061695">
+<bookmark_value>Basic Object constants</bookmark_value>
+<bookmark_value>Empty;Basic constant</bookmark_value>
+<bookmark_value>Null;Basic constant</bookmark_value>
+<bookmark_value>Nothing;Basic constant</bookmark_value>
+<bookmark_value>Basic constant;Nothing</bookmark_value>
+<bookmark_value>Basic constant;Null</bookmark_value>
+<bookmark_value>Basic constant;Empty</bookmark_value>
+ </bookmark>
+
+ <h2 id="hd_id051620171114576454">Object Constants</h2>
+
+ <table id="tbl_051620171033491648">
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id051620171114576921" role="tablehead" xml-lang="en-US">Name</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114578188" role="tablehead" xml-lang="en-US">Type</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051720170824099845" role="tablehead" xml-lang="en-US">Usage</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id051620171114575052" role="paragraph" localize="false">Empty</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114576734" role="paragraph" localize="false">Variant</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id05172017082409622" role="paragraph" xml-lang="en-US">The <emph>Empty</emph> value indicates that the variable is not initialized.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id051620171114577892" role="paragraph" localize="false">Null</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620171114571232" role="paragraph" localize="false">null</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051720170824093395" role="paragraph" xml-lang="en-US">Indicates that the variable does not contain data.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id051720170824091253" role="paragraph" localize="false">Nothing</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051720170824091966" role="paragraph" localize="false">Object</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051720170824097935" role="paragraph" xml-lang="en-US">Assign the <emph>Nothing</emph> object to a variable to remove a previous assignment.</paragraph>
+ </tablecell>
+ </tablerow>
+ </table>
+
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph id="par_id051620171114575772" role="bascode" localize="false">SubExampleEmpty</paragraph>
+ <paragraph id="par_id051620171114572075" role="bascode" localize="false">Dim sVar As Variant</paragraph>
+ <paragraph id="par_id051620171114579662" role="bascode" localize="false"> sVar = Empty</paragraph>
+ <paragraph id="par_id051620171114577052" role="bascode" localize="false"> Print IsEmpty(sVar) ' Returns True</paragraph>
+ <paragraph id="par_id051620171114576576" role="bascode" localize="false">End Sub</paragraph>
+ <paragraph id="par_id051620171114573781" role="bascode" localize="false">Sub ExampleNull</paragraph>
+ <paragraph id="par_id051620171114584136" role="bascode" localize="false">Dim vVar As Variant</paragraph>
+ <paragraph id="par_id05162017111458231" role="bascode" localize="false" > MsgBox IsNull(vVar)</paragraph>
+ <paragraph id="par_id051620171114581488" role="bascode" localize="false">End Sub</paragraph>
+ <paragraph id="par_id051720170824102912" role="bascode" localize="false">Sub ExampleNothing</paragraph>
+ <paragraph id="par_id051720170824104202" role="bascode" localize="false">Dim oDoc As Object</paragraph>
+ <paragraph id="par_id051720170824102971" role="bascode" localize="false"> Set oDoc = ThisComponent</paragraph>
+ <paragraph id="par_id051720170824104997" role="bascode" localize="false"> Print oDoc.Title</paragraph>
+ <paragraph id="par_id051720170824104443" role="bascode" localize="false"> oDoc = Nothing</paragraph>
+ <paragraph id="par_id051720170824106132" role="bascode" localize="false"> Print oDoc ‘ Error</paragraph>
+ <paragraph id="par_id051720170824103527" role="bascode" localize="false">End Sub</paragraph>
+ </bascode>
+ </section>
+ <section id="addvbaconstants">
+ <bookmark xml-lang="en-US" branch="index" id="bm_id101554201127393">
+<bookmark_value>Visual Basic constants</bookmark_value>
+<bookmark_value>VBA Exclusive constants</bookmark_value>
+ </bookmark>
+ <h2 id="hd_id661512312593832">Additional VBA constants</h2>
+ <paragraph role="paragraph" id="par_id111512312705893" xml-lang="en-US">The following constants are available when VBA compatibility mode is enabled</paragraph>
+
+ <embed href="text/sbasic/shared/00000003.xhp#vbasupport"/>
+ <table id="tab_id671512313939217">
+ <tablerow>
+ <tablecell>
+ <paragraph role="tablehead" id="par_id901512312880723" xml-lang="en-US">Named constant</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id891512312916493" role="tablehead" xml-lang="en-US">Hexadecimal (decimal) value</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id991512312965968" role="tablehead" xml-lang="en-US" >Description</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id311542196872466" role="paragraph" localize="false">vbTrue</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id151542196872467" role="paragraph" localize="false">-1</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph role="paragraph" id="par_id671542197262160" xml-lang="en-US">Part of vbTriState enumeration.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id241542196923343" role="paragraph" localize="false">vbFalse</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id611542196923343" role="paragraph" localize="false">0</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph role="paragraph" id="par_id351542197255532" xml-lang="en-US">Part of vbTriState enumeration.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id551542196949698" role="paragraph" localize="false">vbUseDefault</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id831542196949698" role="paragraph" localize="false">-2</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph role="paragraph" id="par_id251542197274514" xml-lang="en-US">Part of vbTriState enumeration.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id891512313266496" role="paragraph" localize="false">vbCr</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph role="paragraph" id="par_id241512313723033" localize="false">\x0D (13)</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph role="paragraph" id="par_id611512313731233" xml-lang="en-US">CR - Carriage return</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id471512313282257" role="paragraph" localize="false">vbCrLf</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id691512313750520" role="paragraph" localize="false">\x0D\x0A (13 10)</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id961512313881937" role="paragraph" xml-lang="en-US" >CRLF - Carriage return and line feed</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id11512313289164" role="paragraph" localize="false">vbFormFeed</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id341512313761295" role="paragraph" localize="false">\x0c (12)</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id221512313889077" role="paragraph" xml-lang="en-US" >FF - Form feed</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id501512313293989" role="paragraph" localize="false">vbLf</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id311512313777558" role="paragraph" localize="false">\x0A (10)</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id621512313896169" role="paragraph" xml-lang="en-US" >LF - Line feed</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id191512313300610" role="paragraph" localize="false">vbNewLine</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id521512319135830" role="listitem" xml-lang="en-US">\x0D\x0A (13 10) for Windows</paragraph>
+ <paragraph id="par_id61512319163913" role="listitem" xml-lang="en-US">\x0A (10) for other systems</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id151512313904989" role="paragraph" xml-lang="en-US" >LF or CRLF </paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id211512313306932" role="paragraph" xml-lang="en-US" localize="false">vbNullString</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id141512313800110" role="paragraph" localize="false">""</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id741512313911049" role="paragraph" xml-lang="en-US" >Null string</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id931512313312621" role="paragraph" localize="false">vbTab</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id241512313810064" role="paragraph" localize="false">\x09 (9)</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id951512313918356" role="paragraph" xml-lang="en-US" >HT - Horizontal tab</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id481512313318983" role="paragraph" localize="false">vbVerticalTab </paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id991512313821414" role="paragraph" localize="false">\x0B (11)</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id351512313924593" role="paragraph" xml-lang="en-US" >VT - Vertical tab</paragraph>
+ </tablecell>
+ </tablerow>
+ </table>
+ </section>
+</body>
+</helpdocument>