This is an old revision of the document!
Table Type
A table is a collection of tuples organized in a special way, where each tuple may be formed by several keys and values. The set of keys in each row must be unique.


The set of all elements at the same position in all rows defines a column. All columns must have a unique name. The names must follow the general name convention in Dinamica EGO, they must start with a “_” or a letter and must be formed by letters, numbers and underscores. Blanks in names are automatically replaced by “_” (underscore).
Keys and values can be represented using double precision floating point numbers, allowing the definition of integral and fractional values, or strings.
Internally, tables are represented using trees.
When stored as Comma-separated_values files, tables may also use the column name/type syntax to represent the column attributes — the name, the indication whether it is key or data/value column, and its data type.
GUI Editor

EGO Script
Tables are sequences of elements enclosed by [ ]. The keys/values are represented by real values or strings. The first line of the sequence specifies the column names. Column names suffixed by “*” represent keys. See Lookup Table Type for lookup tables, a specialized, Real-only case of this same syntax with additional range-generation shorthand.
[ "From*", "To*", "Rate", 1, 2, 0.4, 1, 4, 0.2, 2, 7, 0.5, 4, 8, 0.2 ]
The type of each column is inferred by inspecting the column's values: a column is inferred as Real if every value parses as a number, and as String otherwise — inference has no preference toward either type, it is driven entirely by the data. Elements representing strings can be surrounded by double quotes '“'. The inferred type can always be overridden explicitly with a #type suffix — for example, appending #string to a column name forces it to be read as a string even when its values look like numbers, such as an identifier column where a value like “007” should not collapse to 7.
[ "Categories*", "Name", "Color_Red", "Color_Green", "Color_Blue", 1, "soy", 20, 45, 125, 2, "rice", 20, 100, 125, 7, "coffee", 200, 45, 125, 12, "sugar_cane", 75, 45, 123, 34, "bean", 20, 45, 57, ]
The table below represents the table above without the use of double quotes.
[ Categories*, Name, Color_Red, Color_Green, Color_Blue, 1, soy, 20, 45, 125, 2, rice, 20, 100, 125, 7, coffee, 200, 45, 125, 12, sugar_cane, 75, 45, 123, 34, bean, 20, 45, 57, ]
For an empty table, there is no data to infer a type from, so every column's type must be stated explicitly with a #type suffix — except Real, which remains the implicit default even with no data present, and so can still be omitted.
[ "From*#real", "To*#real", "Variable_Name*#string", "Upper_Range*#real", "Weight_Coefficient#real" ]
Since #real is the default, the table above can be written more compactly by omitting it wherever it appears, leaving only the one genuinely necessary #string annotation:
[ "From*", "To*", "Variable_Name*#string", "Upper_Range*", "Weight_Coefficient" ]
Automatic Conversions
- Converted to: Change Matrix Type, Transition Matrix Type, Transition Function Parameter Matrix Type, Percent Matrix Type, Categorization Type and Lookup Table Type (only if the table has exactly the columns
*#realand#real).