| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 803 |
|
In this example, a table with two columns is created and then populated with some data. The first column is floating point data, the second column ascii.
tableName := 'junk.tbl' # Name of table nameCol1 := 'Velocity' # Names of columns nameCol2 := 'Colour' c1 := tablecreatescalarcoldesc(nameCol1, 1.0) # Column descriptors with template data type c2 := tablecreatescalarcoldesc(nameCol2, 'A') # # td := tablecreatedesc (c1, c2) # Combine column descriptors into table descriptor # # nrow := 5 t := table (tableName, td, nrow) # Create table with given number of rows # # col1Data := [pi, pi/2, pi*3, 0.0, -10.0] # Make some data of the right type and length col2Data := "red green brown blue pink" # # t.putcol(nameCol1, col1Data) # Insert columns t.putcol(nameCol2, col2Data) # t.browse() # Browse # t.done(); # Destroy tool leaving disk file