summaryrefslogtreecommitdiff
path: root/source/text/sbasic/shared/03103600.xhp
diff options
context:
space:
mode:
Diffstat (limited to 'source/text/sbasic/shared/03103600.xhp')
-rw-r--r--source/text/sbasic/shared/03103600.xhp209
1 files changed, 209 insertions, 0 deletions
diff --git a/source/text/sbasic/shared/03103600.xhp b/source/text/sbasic/shared/03103600.xhp
new file mode 100644
index 0000000000..7f09ef0a5f
--- /dev/null
+++ b/source/text/sbasic/shared/03103600.xhp
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<!--***********************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************-->
+
+<helpdocument version="1.0">
+<meta>
+<topic id="textsbasicshared03103600xml" indexer="include" status="PUBLISH">
+<title id="tit" xml-lang="en-US">TypeName Function; VarType Function[Runtime]</title>
+<filename>/text/sbasic/shared/03103600.xhp</filename>
+</topic>
+<history>
+<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
+<lastedited date="2004-12-15T10:34:49">converted from old format - fpe</lastedited>
+</history>
+</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>
+<paragraph role="heading" id="hd_id3143267" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/sbasic/shared/03103600.xhp" name="TypeName Function; VarType Function[Runtime]">TypeName Function; VarType Function[Runtime]</link></paragraph>
+<paragraph role="paragraph" id="par_id3159157" xml-lang="en-US" l10n="U" oldref="2">Returns a string (TypeName) or a numeric value (VarType) that contains information for a variable.</paragraph>
+</section>
+<paragraph role="heading" id="hd_id3153825" xml-lang="en-US" level="2" l10n="U" oldref="3">Syntax:</paragraph>
+<paragraph role="paragraph" id="par_id3155341" xml-lang="en-US" l10n="U" oldref="4">TypeName (Variable)VarType (Variable)</paragraph>
+<paragraph role="heading" id="hd_id3145610" xml-lang="en-US" level="2" l10n="U" oldref="5">Return value:</paragraph>
+<paragraph role="paragraph" id="par_id3148947" xml-lang="en-US" l10n="U" oldref="6">String; Integer</paragraph>
+<paragraph role="heading" id="hd_id3146795" xml-lang="en-US" level="2" l10n="U" oldref="7">Parameters:</paragraph>
+<paragraph role="paragraph" id="par_id3148664" xml-lang="en-US" l10n="U" oldref="8">
+<emph>Variable:</emph> The variable that you want to determine the type of. You can use the following values:</paragraph>
+<table id="tbl_id3153362">
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3145171" xml-lang="en-US" l10n="U" oldref="9">key word</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3156212" xml-lang="en-US" l10n="U" oldref="10">VarType</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3154684" xml-lang="en-US" l10n="U" oldref="11">Variable type</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3151041" xml-lang="en-US" l10n="U" oldref="12">Boolean</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3153367" xml-lang="en-US" l10n="U" oldref="13">11</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3148645" xml-lang="en-US" l10n="U" oldref="14">Boolean variable</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3153138" xml-lang="en-US" l10n="U" oldref="15">Date</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3153363" xml-lang="en-US" l10n="U" oldref="16">7</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3155411" xml-lang="en-US" l10n="U" oldref="17">Date variable</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3146975" xml-lang="en-US" l10n="U" oldref="18">Double</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3150486" xml-lang="en-US" l10n="U" oldref="19">5</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3148616" xml-lang="en-US" l10n="U" oldref="20">Double floating point variable</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3148457" xml-lang="en-US" l10n="U" oldref="21">Integer</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3145647" xml-lang="en-US" l10n="U" oldref="22">2</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3154490" xml-lang="en-US" l10n="U" oldref="23">Integer variable</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3149960" xml-lang="en-US" l10n="U" oldref="24">Long</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3154513" xml-lang="en-US" l10n="U" oldref="25">3</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3151318" xml-lang="en-US" l10n="U" oldref="26">Long integer variable</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3146972" xml-lang="en-US" l10n="U" oldref="27">Object</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3154482" xml-lang="en-US" l10n="U" oldref="28">9</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3150323" xml-lang="en-US" l10n="U" oldref="29">Object variable</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3148405" xml-lang="en-US" l10n="U" oldref="30">Single</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3149020" xml-lang="en-US" l10n="U" oldref="31">4</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3147341" xml-lang="en-US" l10n="U" oldref="32">Single floating-point variable</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3155901" xml-lang="en-US" l10n="U" oldref="33">String</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3155960" xml-lang="en-US" l10n="U" oldref="34">8</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3146313" xml-lang="en-US" l10n="U" oldref="35">String variable</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3145149" xml-lang="en-US" l10n="U" oldref="36">Variant</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3154021" xml-lang="en-US" l10n="U" oldref="37">12</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3145789" xml-lang="en-US" l10n="U" oldref="38">Variant variable (can contain all types specified by the definition)</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3148630" xml-lang="en-US" l10n="U" oldref="39">Empty</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3152584" xml-lang="en-US" l10n="U" oldref="40">0</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3151278" xml-lang="en-US" l10n="U" oldref="41">Variable is not initialized</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3154576" xml-lang="en-US" l10n="U" oldref="42">Null</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3166424" xml-lang="en-US" l10n="U" oldref="43">1</paragraph>
+</tablecell>
+<tablecell colspan="" rowspan="">
+<paragraph role="paragraph" id="par_id3145131" xml-lang="en-US" l10n="U" oldref="44">No valid data</paragraph>
+</tablecell>
+</tablerow>
+</table>
+<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
+<embed href="text/sbasic/shared/00000003.xhp#err5"/>
+<paragraph role="heading" id="hd_id3149338" xml-lang="en-US" level="2" l10n="U" oldref="45">Example:</paragraph>
+<paragraph role="paragraph" id="par_id3150363" xml-lang="en-US" l10n="U" oldref="46">Sub ExampleType</paragraph>
+<paragraph role="paragraph" id="par_id3159088" xml-lang="en-US" l10n="U" oldref="47">Dim iVar As Integer</paragraph>
+<paragraph role="paragraph" id="par_id3150089" xml-lang="en-US" l10n="U" oldref="48">Dim sVar As String</paragraph>
+<paragraph role="paragraph" id="par_id3156139" xml-lang="en-US" l10n="U" oldref="49">Dim siVar As Single</paragraph>
+<paragraph role="paragraph" id="par_id3151217" xml-lang="en-US" l10n="U" oldref="50">Dim dVar As Double</paragraph>
+<paragraph role="paragraph" id="par_id3154658" xml-lang="en-US" l10n="U" oldref="51">Dim bVar As Boolean</paragraph>
+<paragraph role="paragraph" id="par_id3152992" xml-lang="en-US" l10n="U" oldref="52">Dim lVar As Long</paragraph>
+<paragraph role="paragraph" id="par_id3155509" xml-lang="en-US" l10n="U" oldref="53">Msgbox TypeName(iVar) &amp; " " &amp; VarType(iVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph role="paragraph" id="par_id3150370" xml-lang="en-US" l10n="CHG" oldref="54">TypeName(sVar) &amp; " " &amp; VarType(sVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph role="paragraph" id="par_id3155532" xml-lang="en-US" l10n="U" oldref="55">TypeName(siVar) &amp; " " &amp; VarType(siVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph role="paragraph" id="par_id3152988" xml-lang="en-US" l10n="U" oldref="56">TypeName(dVar) &amp; " " &amp; VarType(dVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph role="paragraph" id="par_id3156166" xml-lang="en-US" l10n="U" oldref="57">TypeName(bVar) &amp; " " &amp; VarType(bVar) &amp; Chr(13) &amp;_</paragraph>
+<paragraph role="paragraph" id="par_id3148817" xml-lang="en-US" l10n="U" oldref="58">TypeName(lVar) &amp; " " &amp; VarType(lVar),0,"Some types in $[officename] Basic"</paragraph>
+<paragraph role="paragraph" id="par_id3154259" xml-lang="en-US" l10n="U" oldref="59">end Sub</paragraph>
+</body>
+</helpdocument>