summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/sbasic/shared/03103600.xhp
diff options
context:
space:
mode:
Diffstat (limited to 'helpcontent2/source/text/sbasic/shared/03103600.xhp')
-rw-r--r--helpcontent2/source/text/sbasic/shared/03103600.xhp275
1 files changed, 275 insertions, 0 deletions
diff --git a/helpcontent2/source/text/sbasic/shared/03103600.xhp b/helpcontent2/source/text/sbasic/shared/03103600.xhp
new file mode 100644
index 000000000..6f4d3e345
--- /dev/null
+++ b/helpcontent2/source/text/sbasic/shared/03103600.xhp
@@ -0,0 +1,275 @@
+<?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="textsbasicshared03103600xml" indexer="include" status="PUBLISH">
+ <title id="tit" xml-lang="en-US">TypeName Function; VarType Function</title>
+ <filename>/text/sbasic/shared/03103600.xhp</filename>
+ </topic>
+</meta>
+
+<body>
+<section id="typename">
+<bookmark xml-lang="en-US" branch="index" id="bm_id3143267">
+<bookmark_value>TypeName function</bookmark_value>
+<bookmark_value>VarType function</bookmark_value>
+<bookmark_value>Basic Variable Type constants</bookmark_value>
+</bookmark>
+<h1 id="hd_id3143267"><link href="text/sbasic/shared/03103600.xhp" name="TypeName Function; VarType Function">TypeName Function; VarType Function</link></h1>
+<paragraph id="par_id3159157" role="paragraph" xml-lang="en-US">Returns a string (TypeName) or a numeric value (VarType) that contains information for a variable.</paragraph>
+</section>
+
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<bascode>
+<paragraph id="par_id3155341" role="bascode" xml-lang="en-US">TypeName (Variable) / VarType (Variable)</paragraph>
+</bascode>
+
+<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
+<paragraph id="par_id3148947" localize="false" role="paragraph">String; Integer</paragraph>
+
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+<paragraph id="par_id3148664" role="paragraph" xml-lang="en-US"> <emph>Variable:</emph> The variable that you want to determine the type of. You can use the following values:</paragraph>
+
+<section id="VarType_constants">
+<table id="tbl_id3153362">
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3145171" role="tablehead" xml-lang="en-US">Keyword</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170608269696" role="tablehead" xml-lang="en-US">Named constant</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3156212" role="tablehead" xml-lang="en-US" localize="false">VarType</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3154684" role="tablehead" xml-lang="en-US">Variable type</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3151041" role="paragraph" localize="false" xml-lang="en-US">Boolean</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170609229026" role="paragraph" localize="false" xml-lang="en-US"> </paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3153367" role="paragraph" localize="false" xml-lang="en-US">11</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3148645" role="paragraph" xml-lang="en-US">Boolean variable</paragraph>
+ </tablecell>
+ </tablerow> <tablerow>
+ <tablecell>
+ <paragraph id="par_id3151042" role="paragraph" localize="false" xml-lang="en-US">Byte</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id061620170609229026" role="paragraph" localize="false" xml-lang="en-US"> </paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3253367" role="paragraph" localize="false" xml-lang="en-US">17</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3158645" role="paragraph" xml-lang="en-US">Byte variable</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3153138" role="paragraph" localize="false" xml-lang="en-US">Date</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170608329367" role="paragraph" localize="false" xml-lang="en-US">V_DATE</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3153363" role="paragraph" localize="false" xml-lang="en-US">7</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3155411" role="paragraph" xml-lang="en-US">Date variable</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id051620170608331783" role="paragraph" localize="false" xml-lang="en-US">Currency</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170608333476" role="paragraph" localize="false" xml-lang="en-US">V_CURRENCY</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170608333808" role="paragraph" localize="false" xml-lang="en-US">6</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170608331416" role="paragraph" xml-lang="en-US">Currency variable</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3146975" role="paragraph" localize="false" xml-lang="en-US">Double</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170608337319" role="paragraph" localize="false" xml-lang="en-US">V_DOUBLE</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3150486" role="paragraph" localize="false" xml-lang="en-US">5</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3148616" role="paragraph" xml-lang="en-US">Double floating point variable</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3148457" role="paragraph" localize="false" xml-lang="en-US">Integer</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id05162017060833922" role="paragraph" localize="false" xml-lang="en-US">V_INTEGER</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3145647" role="paragraph" localize="false" xml-lang="en-US">2</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3154490" role="paragraph" xml-lang="en-US">Integer variable</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3149960" role="paragraph" localize="false" xml-lang="en-US">Long</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170608332124" role="paragraph" localize="false" xml-lang="en-US">V_LONG</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3154513" role="paragraph" localize="false" xml-lang="en-US">3</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3151318" role="paragraph" xml-lang="en-US">Long integer variable</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3146972" role="paragraph" localize="false" xml-lang="en-US">Object</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170609224777" role="paragraph" localize="false" xml-lang="en-US"> </paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3154482" role="paragraph" localize="false" xml-lang="en-US">9</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3150323" role="paragraph" xml-lang="en-US">Object variable</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3148405" role="paragraph" localize="false" xml-lang="en-US">Single</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170608337392" role="paragraph" localize="false" xml-lang="en-US">V_SINGLE</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3149020" role="paragraph" localize="false" xml-lang="en-US">4</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3147341" role="paragraph" xml-lang="en-US">Single floating-point variable</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3155901" role="paragraph" localize="false" xml-lang="en-US">String</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id05162017060833587" role="paragraph" localize="false" xml-lang="en-US">V_STRING</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3155960" role="paragraph" localize="false" xml-lang="en-US">8</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3146313" role="paragraph" xml-lang="en-US">String variable</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3145149" role="paragraph" localize="false" xml-lang="en-US">Variant</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170609222468" role="paragraph" localize="false" xml-lang="en-US"> </paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3154021" role="paragraph" localize="false" xml-lang="en-US">12</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3145789" role="paragraph" xml-lang="en-US">Variant variable (can contain all types specified by the definition)</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3148630" role="paragraph" localize="false" xml-lang="en-US">Empty</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id051620170608331395" role="paragraph" localize="false" xml-lang="en-US">V_EMPTY</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3152584" role="paragraph" localize="false" xml-lang="en-US">0</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3151278" role="paragraph" xml-lang="en-US">Variable is not initialized</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id3154576" role="paragraph" localize="false" xml-lang="en-US">Null</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id05162017060833692" role="paragraph" localize="false" xml-lang="en-US">V_NULL</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3166424" role="paragraph" localize="false" xml-lang="en-US">1</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id3145131" role="paragraph" xml-lang="en-US">No valid data</paragraph>
+ </tablecell>
+ </tablerow>
+</table>
+</section>
+
+<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
+<embed href="text/sbasic/shared/00000003.xhp#err5"/>
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+<bascode>
+<paragraph id="par_idm1340870000" role="bascode" localize="false" xml-lang="en-US">Sub ExampleType</paragraph>
+<paragraph id="par_idm1340868768" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Integer</paragraph>
+<paragraph id="par_idm1340867536" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph>
+<paragraph id="par_idm1340866304" role="bascode" localize="false" xml-lang="en-US">Dim siVar As Single</paragraph>
+<paragraph id="par_idm1340865072" role="bascode" localize="false" xml-lang="en-US">Dim dVar As Double</paragraph>
+<paragraph id="par_idm1340863840" role="bascode" localize="false" xml-lang="en-US">Dim bVar As Boolean</paragraph>
+<paragraph id="par_idm1340862608" role="bascode" localize="false" xml-lang="en-US">Dim lVar As Long</paragraph>
+<paragraph id="par_id051620170608333887" role="bascode" localize="false" xml-lang="en-US">Dim cVar as Currency</paragraph>
+<paragraph id="par_id051620170608333925" role="bascode" localize="false" xml-lang="en-US">Dim tVar as Date</paragraph>
+<paragraph id="par_idm1340861376" role="bascode" localize="false" xml-lang="en-US"> MsgBox TypeName(iVar) &amp; " " &amp; VarType(iVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph id="par_idm1340860032" role="bascode" localize="false" xml-lang="en-US"> TypeName(sVar) &amp; " " &amp; VarType(sVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph id="par_idm1340858736" role="bascode" localize="false" xml-lang="en-US"> TypeName(siVar) &amp; " " &amp; VarType(siVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph id="par_idm1340857424" role="bascode" localize="false" xml-lang="en-US"> TypeName(dVar) &amp; " " &amp; VarType(dVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph id="par_idm1340856128" role="bascode" localize="false" xml-lang="en-US"> TypeName(bVar) &amp; " " &amp; VarType(bVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph id="par_id051620170608339345" role="bascode" localize="false" xml-lang="en-US"> TypeName(cVar) &amp; " " &amp; VarType(cVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph id="par_id051620170608347372" role="bascode" localize="false" xml-lang="en-US"> TypeName(tVar) &amp; " " &amp; VarType(tVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph id="par_id3148817" role="bascode" xml-lang="en-US"> TypeName(lVar) &amp; " " &amp; VarType(lVar),0,"Some types In $[officename] Basic"</paragraph>
+<paragraph id="par_idm1340852896" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
+</bascode>
+</body>
+
+</helpdocument>