datatype

Returns the value of the data type.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

char datatype(variable)
ident         variable

Description

Returns a value that corresponds to a data type.
variable is the name of the variable to check.
Variable's Data Type Returned Value
char/string C
datetime D
int I
list L
numeric N
trigger T

Example

Prints out the data type values:
{
char     g[1];
datetime h;
int      i;
list     j;
numeric  k;
trigger  t;

printf("char is " ^^ datatype(g));
printf("datetime is " ^^ datatype(h));
printf("int is " ^^ datatype(i));
printf("list is " ^^ datatype(j));
printf("numeric is " ^^ datatype(k));
printf("trigger is " ^^ datatype(t));
}