Prev
Up
Next![]()
|
|
Do you remember the hidden effects through pointers in the previous example? Here is a similar problem: Again, what is the value of variable x in the last line of this code fragment?
a = 5; b = 10; foo (); x = a+b;The same answer again: "it depends":
| 15 | if foo does not modify a and b |
| ? | otherwise |
For large programs, it is very difficult to trace all the function calls and not to get lost. Bauhaus uncovers all side effects statically through an automatic analysis.
![]()