使用(1, 3)表示tuple,使用[1, 3]表示array。
如果有一个string和一个int,不同类型的,系统就当作tuple处理了。
上述例子中,如果是想往t1中写入数据,可以使用下面的代码:
colName = ["Name", "Age"] colType = ["int", "int"] t1 = table(100:0, colName, colType) t1.tableInsert(22, 22) colName = ["Name", "Age"] colType = ["string", "int"] t1 = table(100:0, colName, colType) t1.tableInsert(`Tom, 22)