Node:Locations, Next:Values and their Operations, Previous:How modes are displayed, Up:Chill

##### Locations and their accesses

A location in Chill is an object which can contain values.

A value of a location is generally accessed by the (declared) name of the location. The output conforms to the specification of values in Chill programs. How values are specified is the topic of the next section, Values and their Operations.

The pseudo-location `RESULT` (or `result`) can be used to display or change the result of a currently-active procedure:

         set result := EXPR

This does the same as the Chill action `RESULT EXPR` (which is not available in GDB).

Values of reference mode locations are printed by `PTR(<hex value>)` in case of a free reference mode, and by `(REF <reference mode>) (<hex-value>)` in case of a bound reference. `<hex value>` represents the address where the reference points to. To access the value of the location referenced by the pointer, use the dereference operator `->`.

Values of procedure mode locations are displayed by

         { PROC
         (<argument modes> ) <return mode> } <address> <name of procedure
         location>

`<argument modes>` is a list of modes according to the parameter specification of the procedure and `<address>` shows the address of the entry point.

Substructures of string mode-, array mode- or structure mode-values (e.g. array slices, fields of structure locations) are accessed using certain operations which are described in the next section, Values and their Operations.

A location value may be interpreted as having a different mode using the location conversion. This mode conversion is written as `<mode name>(<location>)`. The user has to consider that the sizes of the modes have to be equal otherwise an error occurs. Furthermore, no range checking of the location against the destination mode is performed, and therefore the result can be quite confusing.

         (gdb) print int (s(3 up 4)) XXX TO be filled in !! XXX