*Table()

Creates a table with a specified number of records.

Syntax

*Table(table_name, "table_label", table_def, num_recs)

Arguments

table_name
The variable name of the table.
Data type: varname
table_label
The descriptive label of the table.
Data type: label
table_def
An existing table definition.
Data type: DefineTable
num_recs
The number of records in the table.
Data type: integer

Example

*DefineDataSet(dsdef_event)
 *String(number, "Number of events")
 *Real(jnc_disp, "Jounce disp")
 *Real(reb_disp, "Rebound disp")
 *Real(rack_disp, "Rack disp")
 
*Table(tbl, "Events data", tbldef_event, 9)
*EndDefine()
*DefineTable(tbldef_event)
 *String(comment, "Comment")
 *Real(start, "Start")
 *Real(end, "End")
 *Real(wc_l_s, "Left wheel center hgt - start")
 *Real(wc_l_e, "Left wheel center hgt - end")
 *Real(wc_r_s, "Right wheel center hgt - start")
 *Real(wc_r_e, "Right wheel center hgt - end")
 *Real(rack_s, "Rack disp. - start")
 *Real(rack_e, "Rack disp. - end")
 *Integer(steps, "Steps")
*EndDefine()
*DataSet(ds_event, "Displacement event data", 
 dsdef_event)

Context

*BeginMdl()

*DefineAnalysis()

*DefineDataSet()

*DefineSystem()

Properties

Table 1.
Property Returns Data Type Description
label string The descriptive label of the table.
numrecs integer Number of records in the table.
state boolean Control state (TRUE or FALSE).
varname string The variable name of the table.

Comments

A table organizes data into records. Each record in the table is based on a single record definition. Record definitions are created using the *DefineTable() statement. The records in a table are indexed beginning at zero.

Tables are referenced by name, individual records are referenced using the index number, and entities within a record are referenced using the property name. When referencing records and entities, the record index must appear at the end of the line. For example:

In the example shown, ds_event.tbl.wc_l_s.value [3] refers to the value of real variable "wc_l_s" in the fourth record of the table. ds_event.tbl.steps.value refers to an array of integer values of integer variable "steps" in the records of the table.