Returns the data type of the input argument.
ARGTYPE(arg)
arg |
- |
Any value. |
An integer representing the data type. The following return values are possible:
-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 = 12.5i;
c = "text";
argtype(a)
returns 1.
argtype(a*1.1)
returns 2.
argtype(b)
returns 3.
argtype(c)
returns 4.
argtype({1, 2})
returns 5.
argtype(W1)
returns 6.
W1: 1..100;h=text(30.0, 30.0, "Test text")
argtype(h)
returns 105.
ARGTYPE is useful in checking for the proper type of arguments in SPL functions. See the include file SERIES.H for helpful macros that use ARGTYPE.