MIME-Version: 1.0
Server: CERN/3.0
Date: Monday, 16-Dec-96 23:33:13 GMT
Content-Type: text/html
Content-Length: 2120
Last-Modified: Thursday, 01-Feb-96 20:32:23 GMT
CS100 Program 2
CS100 Program 2
Due: Thursday, February 8, 1996.
Please note the following modifications to the Program 2 handout.
- The project file "choose.mu" and source file "choose.c" were not
present in the initial Program 2 folder. These can be found in the
folder "Program 2 choose", which should be downloaded in the usual
way.
- After you get your choose function working properly, as explained in
Step 1 of Part 2, copy the body of this function over to the
template for "choose" in the file "pascal.c" (you'll find a comment
where this body should go). If you added extra code for tracing
purposes while developing the function "choose", make sure you
delete this code before copying.
- It is no longer necessary to turn in a listing of "choose.c", since
the file "pascal.c" now contains your choose function. Thus, in the
checklist of "What to hand in", delete the item beginning "A listing
of the file choose.c ...", and, in the following item, note that
"pascal.c" will now also contain your definition of "choose".
Note: When you try to run Program 2, CodeWarrior may
give you a warning about a "Link" error or warning. You may safely
ignore this. The warning occurs because we are defining our own
function exp
which is already defined in one of the
libraries. CodeWarrior will use our new definition instead of the old
one.
Note: You may only use constructs that have been
taught in class to write Program 2, i.e. expressions, functions, and
recursion. (Even if you know about loops, don't use them.)
Click these links to retrieve the Program 2 folders:
Program 2 Folder
Program 2 Choose Folder
CS100 Spring 1996
pierce@cs.cornell.edu