diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2017-05-17 09:18:45 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@edx.srv.br> | 2017-05-19 15:50:03 +0200 |
commit | 71d9804e62dfb6435b99f7e1020db0ce8fdb7e87 (patch) | |
tree | 9003b75d1bbe4d5af5b5c1e95763d30ee801a436 /source/text | |
parent | bc9c15f996e91256162d8585adf970123f6dd559 (diff) |
tdf#84675 (part3) Document Basic constants
Document Basic constants more explicitely.
Change-Id: I76958041552148cc65e5bfb49eed6944991a0637
Reviewed-on: https://gerrit.libreoffice.org/37705
Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
(cherry picked from commit a50d8ddab0d6037ee72424a21a18b9d07d53bdb7)
Reviewed-on: https://gerrit.libreoffice.org/37772
Diffstat (limited to 'source/text')
-rw-r--r-- | source/text/sbasic/shared/03000000.xhp | 61 | ||||
-rw-r--r-- | source/text/sbasic/shared/03040000.xhp | 201 |
2 files changed, 231 insertions, 31 deletions
diff --git a/source/text/sbasic/shared/03000000.xhp b/source/text/sbasic/shared/03000000.xhp index 27cb476658..46d180104f 100644 --- a/source/text/sbasic/shared/03000000.xhp +++ b/source/text/sbasic/shared/03000000.xhp @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> - - +<helpdocument version="1.0"> <!-- * This file is part of the LibreOffice project. * @@ -17,36 +16,36 @@ * 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 . - --> +--> -<helpdocument version="1.0"> <meta> -<topic id="textsbasicshared03000000xml" indexer="include" status="PUBLISH"> -<title xml-lang="en-US" id="tit">Run-Time Functions</title> -<filename>/text/sbasic/shared/03000000.xhp</filename> -</topic> -<history> -<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created> -</history> + <topic id="textsbasicshared03000000xml" indexer="include" status="PUBLISH"> + <title id="tit" xml-lang="en-US">Run-Time Functions</title> + <filename>/text/sbasic/shared/03000000.xhp</filename> + </topic> </meta> + <body> - - - <section id="runtime"> - <paragraph id="hd_id3152895" role="heading" level="1" xml-lang="en-US"><variable id="doc_title"><link href="text/sbasic/shared/03000000.xhp" name="Run-Time Functions">Run-Time Functions</link></variable></paragraph> - <paragraph xml-lang="en-US" role="paragraph" id="par_id3148983">This section describes the Runtime Functions of <item type="productname">%PRODUCTNAME</item> Basic.</paragraph> - </section> - <embed href="text/sbasic/shared/03010000.xhp#bildschirmeinaus"/> - <embed href="text/sbasic/shared/03020000.xhp#dateieinaus"/> - <embed href="text/sbasic/shared/03030000.xhp#datumzeit"/> - <embed href="text/sbasic/shared/03050000.xhp#fehlerbehan"/> - <embed href="text/sbasic/shared/03060000.xhp#logi"/> - <embed href="text/sbasic/shared/03070000.xhp#mathe"/> - <embed href="text/sbasic/shared/03080000.xhp#nummer"/> - <embed href="text/sbasic/shared/03090000.xhp#programmablauf"/> - <embed href="text/sbasic/shared/03100000.xhp#variablen"/> - <embed href="text/sbasic/shared/03110000.xhp#vergleich"/> - <embed href="text/sbasic/shared/03120000.xhp#zeichen"/> - <embed href="text/sbasic/shared/03130000.xhp#sonstige"/> - </body> -</helpdocument> + + +<section id="runtime"> + +<paragraph id="hd_id3152895" role="heading" level="1" xml-lang="en-US"><variable id="doc_title"><link href="text/sbasic/shared/03000000.xhp" name="Run-Time Functions">Run-Time Functions</link></variable></paragraph> +<paragraph id="par_id3148983" role="paragraph" xml-lang="en-US">This section describes the Runtime Functions of <item type="productname">%PRODUCTNAME</item> Basic.</paragraph> +</section> +<embed href="text/sbasic/shared/03040000.xhp#basic_constants"/> +<embed href="text/sbasic/shared/03010000.xhp#bildschirmeinaus"/> +<embed href="text/sbasic/shared/03020000.xhp#dateieinaus"/> +<embed href="text/sbasic/shared/03030000.xhp#datumzeit"/> +<embed href="text/sbasic/shared/03050000.xhp#fehlerbehan"/> +<embed href="text/sbasic/shared/03060000.xhp#logi"/> +<embed href="text/sbasic/shared/03070000.xhp#mathe"/> +<embed href="text/sbasic/shared/03080000.xhp#nummer"/> +<embed href="text/sbasic/shared/03090000.xhp#programmablauf"/> +<embed href="text/sbasic/shared/03100000.xhp#variablen"/> +<embed href="text/sbasic/shared/03110000.xhp#vergleich"/> +<embed href="text/sbasic/shared/03120000.xhp#zeichen"/> +<embed href="text/sbasic/shared/03130000.xhp#sonstige"/> +</body> + +</helpdocument>
\ No newline at end of file diff --git a/source/text/sbasic/shared/03040000.xhp b/source/text/sbasic/shared/03040000.xhp new file mode 100644 index 0000000000..ec80f030d6 --- /dev/null +++ b/source/text/sbasic/shared/03040000.xhp @@ -0,0 +1,201 @@ +<?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>Pi;Basic constant</bookmark_value> + <bookmark_value>Null;Basic constant</bookmark_value> + <bookmark_value>Empty;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_value>Basic constant;Pi</bookmark_value> + <bookmark_value>Basic constant;False</bookmark_value> + <bookmark_value>Basic constant;True</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> + +<paragraph id="par_id051620171022382581" role="heading" level="2" xml-lang="en-US">Boolean constants</paragraph> + +<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="tablecontent" localize="false" xml-lang="en-US">True</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id051620171114563299" role="tablecontent" localize="false" xml-lang="en-US">Boolean</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id051620171114565603" role="tablecontent" localize="false" xml-lang="en-US">1</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id051620171114564178" role="tablecontent" localize="false" xml-lang="en-US">False</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id051620171114566455" role="tablecontent" localize="false" xml-lang="en-US">Boolean</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id051620171114563986" role="tablecontent" localize="false" xml-lang="en-US">0</paragraph> + </tablecell> + </tablerow> +</table> + + +<paragraph id="hd_id051620171114566623" role="heading" level="2" xml-lang="en-US">Example</paragraph> +<bascode> +<paragraph id="par_id051620171114567539" role="bascode" localize="false" xml-lang="en-US">Dim bPositive as Boolean</paragraph> +<paragraph id="par_id051620171114574976" role="bascode" localize="false" xml-lang="en-US">bPositive = True</paragraph> +</bascode> + +<paragraph id="hd_id051620171114573549" role="heading" level="2" xml-lang="en-US">Mathematical constant</paragraph> + +<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="tablecontent" localize="false" xml-lang="en-US">Pi</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id051620171114571506" role="tablecontent" localize="false" xml-lang="en-US">Double</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id051620171114576361" role="tablecontent" localize="false" xml-lang="en-US">3.14159265358979</paragraph> + </tablecell> + </tablerow> +</table> + + +<paragraph id="hd_id051620171114571721" role="heading" level="2" xml-lang="en-US">Example</paragraph> +<bascode> +<paragraph id="par_id051620171114575849" role="bascode" localize="false" xml-lang="en-US">Function Rad2Deg( aRad as Double) As Double</paragraph> +<paragraph id="par_id051620171114575132" role="bascode" localize="false" xml-lang="en-US">Rad2Deg = aRad * 180.00 / Pi</paragraph> +<paragraph id="par_id051620171114571381" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> +</bascode> + +<paragraph id="hd_id051620171114576454" role="heading" level="2" xml-lang="en-US">Object Constants</paragraph> + +<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="tablecontent" localize="false" xml-lang="en-US">Empty</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id051620171114576734" role="tablecontent" localize="false" xml-lang="en-US">Variant</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id05172017082409622" role="tablecontent" 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="tablecontent" localize="false" xml-lang="en-US">Null</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id051620171114571232" role="tablecontent" localize="false" xml-lang="en-US">null</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id051720170824093395" role="tablecontent" xml-lang="en-US">Indicates that the variable does not contain data.</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id051720170824091253" role="tablecontent" localize="false" xml-lang="en-US">Nothing</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id051720170824091966" role="tablecontent" localize="false" xml-lang="en-US">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> + + +<paragraph id="hd_id051620171114572289" role="heading" level="2" xml-lang="en-US">Example</paragraph> +<bascode> +<paragraph id="par_id051620171114575772" role="bascode" localize="false" xml-lang="en-US">SubExampleEmpty</paragraph> +<paragraph id="par_id051620171114572075" role="bascode" localize="false" xml-lang="en-US">Dim sVar As Variant</paragraph> +<paragraph id="par_id051620171114579662" role="bascode" localize="false" xml-lang="en-US"> sVar = Empty</paragraph> +<paragraph id="par_id051620171114577052" role="bascode" localize="false" xml-lang="en-US"> Print IsEmpty(sVar) ' Returns True</paragraph> +<paragraph id="par_id051620171114576576" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> +<paragraph id="par_id051620171114573781" role="bascode" localize="false" xml-lang="en-US">Sub ExampleNull</paragraph> +<paragraph id="par_id051620171114584136" role="bascode" localize="false" xml-lang="en-US">Dim vVar As Variant</paragraph> +<paragraph id="par_id05162017111458231" role="bascode" localize="false" xml-lang="en-US"> MsgBox IsNull(vVar)</paragraph> +<paragraph id="par_id051620171114581488" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> +<paragraph id="par_id051720170824102912" role="bascode" localize="false" xml-lang="en-US">Sub ExampleNothing</paragraph> +<paragraph id="par_id051720170824104202" role="bascode" localize="false" xml-lang="en-US">Dim oDoc As Object</paragraph> +<paragraph id="par_id051720170824102971" role="bascode" localize="false" xml-lang="en-US"> Set oDoc = ThisComponent</paragraph> +<paragraph id="par_id051720170824104997" role="bascode" localize="false" xml-lang="en-US"> Print oDoc.Title</paragraph> +<paragraph id="par_id051720170824104443" role="bascode" localize="false" xml-lang="en-US"> oDoc = Nothing</paragraph> +<paragraph id="par_id051720170824106132" role="bascode" localize="false" xml-lang="en-US"> Print oDoc ‘ Error</paragraph> +<paragraph id="par_id051720170824103527" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> +</bascode> +</body> + +</helpdocument> |