summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/sbasic/shared/03102800.xhp
blob: 650992598ee01eb15041d8470d0989f0c47adc53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * 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 .
 -->
<helpdocument version="1.0">
<meta>
<topic id="textsbasicshared03102800xml" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">IsObject Function</title>
<filename>/text/sbasic/shared/03102800.xhp</filename>
</topic>
<history>
<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
</history>
</meta>
<body>
<section id="isobject">
<bookmark xml-lang="en-US" branch="index" id="bm_id3149346"><bookmark_value>IsObject function</bookmark_value>
</bookmark>
<paragraph role="heading" id="hd_id3149346" xml-lang="en-US" level="1"><link href="text/sbasic/shared/03102800.xhp" name="IsObject Function">IsObject Function</link></paragraph>
<paragraph role="paragraph" id="par_id3148538" xml-lang="en-US">Tests if a variable is an object, as opposed to primitive data types such as dates, numbers, texts. The function returns <literal>True</literal> if the variable is an object, otherwise it returns <literal>False</literal>.</paragraph>
</section>
<paragraph role="heading" id="hd_id3149234" xml-lang="en-US" level="2">Syntax:</paragraph>
<bascode>
<paragraph role="bascode" id="par_id3154285" xml-lang="en-US">IsObject(var)</paragraph>
</bascode>
<paragraph role="heading" id="hd_id3148685" xml-lang="en-US" level="2">Return value:</paragraph>
<paragraph role="paragraph" id="par_id3156024" xml-lang="en-US">Boolean</paragraph>
<paragraph role="heading" id="hd_id3148947" xml-lang="en-US" level="2">Parameters:</paragraph>
<paragraph role="paragraph" id="par_id3148552" xml-lang="en-US">
<emph>var:</emph> Any variable that you want to test.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<paragraph role="paragraph" id="par_id891575896963115">The following objects return <literal>True</literal>:</paragraph>
  <list type="unordered">
    <listitem><paragraph id="par_id471575892220352" role="listitem"><switchinline select="sys"><caseinline select="WIN">OLE objects or </caseinline></switchinline>UNO objects</paragraph></listitem>
    <listitem><paragraph id="par_id451575892264518" role="listitem"><link href="text/sbasic/shared/classmodule.xhp" name="Class module">Class module</link> object instances</paragraph></listitem>
    <listitem><paragraph id="par_id851575882379006" role="listitem"><link href="text/sbasic/shared/03090413.xhp" name="Extended types">Extended types</link> or <link href="text/sbasic/shared/enum.xhp" name="enumerations">enumerations</link></paragraph>  </listitem>
    <listitem><paragraph id="par_id131575882378422" role="listitem">Routines or variables when defined as Object.</paragraph></listitem>
    <listitem><paragraph id="par_id511575889156356" role="listitem">%PRODUCTNAME Basic modules</paragraph></listitem>
  </list>
  <warning id="par_id441575886284392">Data structures return <literal>True</literal> even when empty. Object defined variables return <literal>True</literal> even if uninitialized.</warning>
  <section id="relatedtopics">
   <paragraph role="paragraph" id="par_id191575887649871"><link href="text/sbasic/shared/enum.xhp" name="Enum statement">Enum statement</link></paragraph>
   <embed href="text/sbasic/shared/classmodule.xhp#classmodulestatement"/>
   <!-- Function statement-->
   <!-- Object type-->
   <!-- CreateObject-->
   <!-- UNO objects-->
   <!-- Property statement-->
   <paragraph role="paragraph" id="par_id51575897210153"><link href="text/sbasic/shared/03090413.xhp" name="Type statement">Type statement</link></paragraph>
   <paragraph role="paragraph" id="par_id811575887627196"><link href="text/sbasic/shared/01020100.xhp" name="Using variables">Using variables</link></paragraph>
</section>
</body>
</helpdocument>