A (Short) Digression




Document: Software Engineering 1: Course Notes

next Getting data into a function
up Moving Data Around
previous Thinking Local...

A (Short) Digression

We will look at the separate data transfer mechanisms in turn, below; but first: a digression. A common confusion among students is between the notion of moving data around inside a program - between the functions making up a program - and moving data between the program and the outside world (screen, keyboard, diskette files etc.). Granted these two things are both involved with moving data around. And granted, it turns out that to do the latter (move data into or out of the program) we also have to do the former (move data around within the program - specifically between our own user-defined functions and those standard library functions, such as printf() and scanf(), which actual do the direct exchange of data with the outside world). But still, the two concepts are quite different and should be kept distinct. We very frequently do the former without the latter (i.e. move data around within the program without exchanging data with the outside world). I will use (and reserve) the terms "input" and "output", and also "reading" and "writing", with the technical connotation of moving data between the program and the outside world. When dealing with data movement within the program I will use an alternative set of terms, to be introduced below. I encourage you to adopt this more precise vocabulary also.




Document: Software Engineering 1: Course Notes

next Getting data into a function
up Moving Data Around
previous Thinking Local...



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