Difference between revisions of "Manuals/calci/TYPE"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="2SpaceContent" align="left"><div class="ZEditBox" align=...")
 
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
<div style="font-size:30px">'''TYPE (InputValue) '''</div><br/>
 +
*where, <math>InputValue</math> is an input value.
 +
**TYPE(), returns a number indicating the data type of a value.
  
Syntax
+
== Description ==
 +
TYPE(InputValue)
 +
*TYPE() function can be used when the behavior of some function depends on the type of particular input value.
 +
*Argument <math>InputValue</math> can be a number, text, a logical value, array etc.
 +
*Below table shows the 'Return Type' with respect to the values:
  
</div></div>
+
{| class="wikitable"
----
+
|-
<div id="2SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
! VALUE !! RETURN TYPE
 
+
|-
Examples
+
| Number || 1
 
+
|-
</div></div>
+
| Text || 2  
----
+
|-
<div id="8SpaceContent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman">''''''''''''<font size="6"> </font>''' '''''''''</font>'''</div></div>
+
| Logical Value || 4
----
+
|-
<div id="11SpaceContent" align="left"><div class="ZEditBox mceEditable" align="justify">
+
| Error Value || 16
 
+
|-
<font size="5">Description</font>
+
| Array || 64
 
+
|}
</div></div>
 
----
 
<div id="5SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">This function gives the type of value. </font></font></font>
 
 
 
</div></div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="6">TYPE</font></div></div>
 
----
 
<div id="6SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">'''TYPE'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">(</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''V'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">)</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">if  V is type that shows</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Number 1</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Text 2</font></font></font>
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Logical value 4</font></font></font>
+
*If value of a cell reference is a formula, TYPE() displays the type of the formula's resulting value.
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Error value 16</font></font></font>
+
== Examples ==
  
<br /><br />
+
Consider the following example in Calci that shows the use of TYPE function:
  
</div></div>
+
<div id="2SpaceContent" class="zcontent" align="left">
----
 
<div id="1SpaceContent" class="zcontent" align="left">
 
  
 
{| id="TABLE3" class="SpreadSheet blue"
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
|- class="even"
| class=" " |
+
| class="sshl_f" | 3200
| Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="sshl_f " | PETER
 
| class="sshl_f" | 2
 
| class="sshl_f " | 20
 
| class="sshl_f" | 1
 
|- class="even"
 
| class="  " | Row2
 
| class="                                                                                                        " |
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 +
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="sshl_f" | 8/19/2010
| class=" SelectTD" |
 
<div id="1Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="1Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 +
 
|- class="even"
 
|- class="even"
| Row4
+
| class="sshl_f" | Welcome
| class=" " |
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 +
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
+
| class="sshl_f" | TRUE
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row6
 
| class=" " |
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 +
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
=TYPE(A1) : Returns the type for number value. Displays '''1''' as a result.
----
+
=TYPE(A2) : Returns the type for number value. Displays '''1''' as a result.
<div id="4SpaceContent" class="zcontent" align="left"> 
+
=TYPE(A3) : Returns the type for a text value. Displays '''2''' as a result.
 +
=TYPE(A4) : Returns the type for a logical value. Displays '''4''' as a result.
 +
=TYPE(A1+100) : Returns the type for resulting number value from a formula. Displays '''1''' as a result.
 +
=TYPE([1,2;3,4]) : Returns the type for an array value. Displays '''64''' as a result.
 +
 
 +
==Related Videos==
 +
 
 +
{{#ev:youtube|v=qSKr6k5KO_Q|280|center|Type}}
 +
 
 +
== See Also ==
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Let's see an example </font></font></font>
+
*[[Manuals/calci/text | text]]
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Let B2 = Peter</font></font></font>
+
== References ==
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">I.e.=TYPE(B2) is 2</font></font></font>
+
*[http://en.wikipedia.org/wiki/Data_types Data Types]
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Let D2 =20</font></font></font>
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">I.e.=TYPE(D2) is 1</font></font></font>
 
  
<br /><br />
+
*[[Z_API_Functions | List of Main Z Functions]]
  
</div>
+
*[[ Z3 |  Z3 home ]]
----
 

Latest revision as of 14:33, 20 March 2019

TYPE (InputValue)


  • where, is an input value.
    • TYPE(), returns a number indicating the data type of a value.

Description

TYPE(InputValue)

  • TYPE() function can be used when the behavior of some function depends on the type of particular input value.
  • Argument can be a number, text, a logical value, array etc.
  • Below table shows the 'Return Type' with respect to the values:
VALUE RETURN TYPE
Number 1
Text 2
Logical Value 4
Error Value 16
Array 64
  • If value of a cell reference is a formula, TYPE() displays the type of the formula's resulting value.

Examples

Consider the following example in Calci that shows the use of TYPE function:

3200
8/19/2010
Welcome
TRUE
=TYPE(A1) : Returns the type for number value. Displays 1 as a result.
=TYPE(A2) : Returns the type for number value. Displays 1 as a result.
=TYPE(A3) : Returns the type for a text value. Displays 2 as a result.
=TYPE(A4) : Returns the type for a logical value. Displays 4 as a result.
=TYPE(A1+100) : Returns the type for resulting number value from a formula. Displays 1 as a result.
=TYPE([1,2;3,4]) : Returns the type for an array value. Displays 64 as a result.

Related Videos

Type

See Also

References