PrevPrev UpUp NextNext Pointers of conceptsPointers of concepts


Resolve Pointers

Here is an example program with pointers. Bauhaus resolves the pointers and generates HTML files that allow you to browse the program's pointers.

If you click on the line that contains the pointer expression (line 10), you obtain the possible targets of all pointers in this line in the bottom frame. The pointer expression *p may denote either a or b depending upon where g is called. This dependency is expressed through calling contexts.

A calling context describes the sequence of call sites that lead to a function. In the program below, we have two different calling contexts for g: main calls g in line 24 and main calls g in line 26.

For the first calling context, f1 has set the value of p to the address of a. In the second calling context, this variable definition was overriden through an assignment in f2 which sets p to the address of b.

Important note:

You may now Pointers of conceptscontinue with the pointer information for concepts. This will open a new browser window that will browse the HTML pages automatically generated by Bauhaus. These HTML files are very large, which may cause delays if you are accessing these files using a slow connection. You may want to download the complete guided tour instead and browse these files locally. Or you may want to take a shortcut to the next section.

Pointer example

Last modified: Fri Aug 29 17:35:11 MET DST 2003