Moving Data Around




Document: Software Engineering 1: Course Notes

next Thinking Global...
up Chapter 2 pp. 20-26
previous What's a function anyway?

Moving Data Around

All right: so far the concern here has been with the concept of a C function, and an outline of how they can be defined and used. Now we need to get down to some more nitty gritty specifics!

In general, if we want to decompose a program into a set of functions then, for the functions to co-operate or interact properly they will need to, in some sense "share" data between them. By "data" here I essentially mean variables. How can the required data sharing be achieved?

C supports two quite different models for sharing or exchanging data between functions. We will consider them in turn.






Document: Software Engineering 1: Course Notes

next Thinking Global...
up Chapter 2 pp. 20-26
previous What's a function anyway?



McMullin@ugmail.eeng.dcu.ie
Wed Apr 12 19:40:14 BST 1995