Previous: Variable Look Up Example, Up: Variables


2.3.3 Reference Variables

Having a variable refer some same piece of data at all times will sometimes not do. The reference variables allow for dynamic data binding.

A variable is acknowledged as a reference one when it has the X1f4_E4_REFERENCE bit set in its flags definition field.

See Variable Flags.

See struct x1f4_variable_type.

When such references come into use, the data will not be read from the associated state pointer (as is for non reference variables). Instead the same state pointer is interpreted as a pointer to a struct x1f4_stateset_type record.

See struct x1f4_stateset_type.

The struct x1f4_stateset_type data retriever such indicated will be used to retrieve the address at which the data is stored (by calling its get method, with its context attribute, the address of the variable and the address at which the data address is expected as arguments, in this order).