Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
Every segment contains a header and a set of nested tables. The header contains a set of flags, one of which determines how the data names are represented. Also in the header is the "dope vector", which contains offset pointers to each of the tables. Immediately following the header, is the outermost table. This contains elements (numerics, character strings, opcodes, and tags). There are two ways that the data names ("Name Table") are stored. The first way, which is useful for Class Definitions, is
(("woo", "yay", "squee") ,
(value of woo [1], value of yay [1], value of squee [1]),
(value of woo [2]), value of yay [2], value of squee [2]),
(........));
This is useful, for example for C++ structs, Pascal records, or COBOL records. The procedure code will not contain the plaintext Data Name itself, merely the offset or subscript (e.g. woo = 1, yay = 2, and squee = 3.)
The other way is used for "local variables" and stores each data name with its value (again this doesn't cause inefficiency because the datanames are not present in the procedure code, just the indices into the buffer. just like Basic on the Atari 800XL).
For example : (("woo", value of woo), "yay", value of yay,) ("squee", value of squee )). Both cases are resolved by the LIST command, which uses the field index to retrieve the plaintext name from the table.
The reason for these two forms of representation is to simplify the effect of the FBI "insert" ( << ) and "extract" ( >> ) operations, because they must not disturb the binding of a dataname to its value. So that if we insert a new item, for example "eek" into a table, let's say at position 2 (using "squishy" :[2]:> eek;) we must update both the list of names AND the list of values simultaneously. Thus the new Data Name "eek" will have the value "squishy", without disturbing the names or values of "yay" or "squee".