Post Reply 
Template for a table editor [▣=▣ ].
04-13-2019, 12:26 PM (This post was last modified: 04-19-2019 02:20 PM by compsystems.)
Post: #1
Template for a table editor [▣=▣ ].
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

PHP Code:
tbl1:= table( (0,0)=9p1=[9,8,7], 3=-10,"b"=20,"c"=30,"d"=40,"a"=10) [enterreturns

table
(
  
= -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
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Template for a table editor [▣=▣ ]. - compsystems - 04-13-2019 12:26 PM



User(s) browsing this thread: 1 Guest(s)