DADiSP Worksheet Functions > Function Categories > Variables > VALUETYPE
Returns the type of data stored in the specified variable.
VALUETYPE(var, vartype)
var |
- |
Variable or variable name. |
||||||||||
vartype |
- |
Optional. An integer, the type of variable:
|
An integer representing the type of the variable's data. The return integer can be one of the following:
-11: |
Unspecified |
1: |
Integer |
2: |
Real |
3: |
Complex |
4: |
String |
5: |
Series |
6: |
Window |
10: |
Function |
104: |
Pointer |
105: |
Object Handle |
120: |
Window Reference |
a = 10; b = 20.0; c = integ(w1)
valuetype(a) returns 1
valuetype(b) returns 2
valuetype(c) returns 5
The file SERIES.H includes a number of useful macros to simplify SPL functions. For example, the IS_UNSPECIFIED macro can be used to determine if an argument to a function is not specified.
Argument x is default to 10 if not specified.