CSCI 1300 - Exercise 4
More about Program Design and Functions

What You'll Get from This Exercise

This exercise is to supplement your reading on functions and parameters.

PC Labs in the
Engineering Center
CR 235    CR 239
CR 244    CR 252 (24 hours)
CH 107    ME 107
Other campus sites are
listed at www.colorado.edu/its/labs.

Installing the
CS1300 Software
Open a DOS window. If the CS1300 software is not permanently
installed on your machine, then use one of these methods:
If you get the message "Out of environment space", then:
  • Click on the MS-DOS icon in the top left corner of the window.
  • Select Properties from the pop-up menu.
  • Select the Memory tab from the command box.
  • Click the arrow on the Initial Environment box. Move down in the box as far as possible (by clicking the downward arrow). Click on the biggest number that you see in this box.
  • Click OK in the command box.
  • Click OK in the MS-DOS Prompt information box.
  • Stop the DOS Session by clicking the X in the top-right or by typing the command "exit".
  • Restart a new DOS session and try running your commands again.

A Program to Illustrate Parameters

You'll start this exercise by getting and running a parameter demonstration program. Start by copying params.cxx from your installed cs1300\lab\ directory to your working directory.

The Purpose of params.cxx

Illustrating a Value Parameter with the Debugger

Changing to a Reference Parameter

Illustrating a Reference Parameter with the Debugger