form

Syntax

form(X)

Arguments

X is an arbitrary 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);
0

$ form(`TEST);
0

$ form(`t1`t2`t3);
1

$ form(1 2 3);
1

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

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