Difference between revisions of "Manuals/calci/TYPE"
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 | + | <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. | ||
| − | + | == 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: | ||
| − | + | {| class="wikitable" | |
| − | + | |- | |
| − | + | ! 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: | |
| − | + | <div id="2SpaceContent" class="zcontent" align="left"> | |
| − | |||
| − | <div id=" | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
| − | + | | class="sshl_f" | 3200 | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | class="sshl_f " | | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| class=" " | | | class=" " | | ||
| class=" " | | | class=" " | | ||
| + | |||
|- class="odd" | |- class="odd" | ||
| − | + | | class="sshl_f" | 8/19/2010 | |
| − | | class=" | ||
| − | |||
| − | |||
| class=" " | | | class=" " | | ||
| class=" " | | | class=" " | | ||
| + | |||
|- class="even" | |- class="even" | ||
| − | + | | class="sshl_f" | Welcome | |
| − | |||
| − | | class=" " | | ||
| class=" " | | | class=" " | | ||
| class=" " | | | class=" " | | ||
| + | |||
|- class="odd" | |- class="odd" | ||
| − | | class=" " | | + | | class="sshl_f" | TRUE |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| class=" " | | | class=" " | | ||
| class=" " | | | class=" " | | ||
| + | |||
|} | |} | ||
| − | + | =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== | ||
| + | |||
| + | {{#ev:youtube|v=qSKr6k5KO_Q|280|center|Type}} | ||
| + | |||
| + | == See Also == | ||
| − | + | *[[Manuals/calci/text | text]] | |
| − | + | == References == | |
| − | + | *[http://en.wikipedia.org/wiki/Data_types Data Types] | |
| − | |||
| − | |||
| − | + | *[[Z_API_Functions | List of Main Z Functions]] | |
| − | + | *[[ Z3 | Z3 home ]] | |
| − | |||
Latest revision as of 13: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
See Also
References