form

Syntax

form(X)

Arguments

X is a variable or constant.

Details

Generate the data form ID of a variable or a constant. Data form IDs and their corresponding data forms are: 0: scalar; 1: vector; 2: pair; 3: matrix; 4: set; 5: dictionary; 6: table.

Examples

form(false);
// output
0

form(`TEST);
// output
0

form(`t1`t2`t3);
// output
1

form(1 2 3);
// output
1

x= 1 2 3
if(form(x) == VECTOR){y=1}
y;
// output
1

form(1..6$2:3);
// output
3