Skip to content

type

Datatype of an object

Syntax: type x, type[x]

Where x is any object, returns its datatype.

The datatype is a short int: negative for atoms, positive for vectors, 0h for a general list.

q)type 5                         / integer atom
-6h   
q)type 2 3 5                     / integer vector
6h   
q)type (2;3 5;"hello")           / mixed list
0h
q)type each (2;3 5;"hello")      / mixed list
-6 9 10h
q)type (+)                       / function atom
102h

.Q.ty
Basics: Casting and encoding, Datatypes