04-13-2019, 12:26 PM
Hello
There is a very useful data type TABLE, it works in a similar way to the Python DICTIONARY, unlike a matrix that addresses each position by means of a "coordinate" (rows, columns), a table is addressed by a label that can be a number, a string of characters or a coordinate.
The TABLE editor is similar to the matrix editor. Simply for each position there would be two entries one for the label and one for the content.
The template for the table editor will be included in an icon next to the rest of the templates (key C / templates)
Examples
There is a very useful data type TABLE, it works in a similar way to the Python DICTIONARY, unlike a matrix that addresses each position by means of a "coordinate" (rows, columns), a table is addressed by a label that can be a number, a string of characters or a coordinate.
The TABLE editor is similar to the matrix editor. Simply for each position there would be two entries one for the label and one for the content.
The template for the table editor will be included in an icon next to the rest of the templates (key C / templates)
Examples
PHP Code:
tbl1:= table( (0,0)=9, p1=[9,8,7], 3=-10,"b"=20,"c"=30,"d"=40,"a"=10) [enter] returns
table(
3 = -10,
p1 = [9,8,7],
(0,0) = 9,
"a" = 10,
"b" = 20,
"c" = 30,
"d" = 40
)
PHP Code:
tbl1["a"] [enter] returns 10
tbl1[3] [enter] returns -10
tbl1[(0,0)] [enter] returns 9
tbl1[p1] [enter] returns [9,8,7]