4.6 Inspecting Values and Types

The Oz Inspector is a output tool provided by the Oz programming interface. The Oz Inspector is written in Oz itself and bound to the global variable Inspect. For instance, we can inspect the value of the term 2*4+3 by executing:

declare X=2*4+3  
{Inspect X}

Evaluating the statement {Inspect X} evokes the side effect of inspecting that value of X which is 11. Note that {Inspect X} is a statement and not an expression, so that it does not have any value itself.

The Inspector allows you to observe the values of expressions. For instance, feed the following lines to the emulator.

declare A = 'Maria' 
declare L = [A 'Klaus']
declare R = address(street:'Talstrasse'  
                    name:unit(first:hans  
                              second:kamp)
                    kids:L)
declare T = tuple(A L R)
{Inspect T}
 
 
 


Denys Duchier, Claire Gardent and Joachim Niehren
Version 1.3.99 (20050412)