First aol had no obligation to open its im system to

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: by value (identified in Pascal by keyword var), where the caller provides the actual parameter value, and by reference, where the caller provides a pointer to the value. In C, all parameters are passed by value, but we can simulate the effect of a reference parameter by explicitly generating a pointer to a value and passing this pointer to a procedure. We saw this in function fun (Figure 3.25) with the parameter xp. With the initial call fun(&x) (line 42), the function is given a reference to local variable x in test. This variable is decremented by each call to fun (line 35), causing the recursion to stop after two calls. C++ reintroduced the concept of a reference parameter, but many feel this was a mistake. End 3.12 Life in the Real World: Using the G DB Debugger The GNU debugger GDB provides a number of useful features to support the run-time evaluation and analysis of machine-level programs. With the examples and exercises in this book, we attempt to infer the behavior of a program by just looking at the code. Using GDB, it becomes possible to study the behavior by...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online