Computer Science 126
Spring 1997

  • What's New · What's Changed
  • Schedule and Reading
  • General Information
  • Assignments
  • Lecture Slides
  • Help!

  • Lab TA Schedule · Emacs Quick Reference · Gdb Tutorial
    Postscript Cheatsheet · A First Guide to PostScript · Postscript Operators
    TOY Quick Reference · Sample TOY Programs
    Sample C Programs · libmisc Code

    Where should I go for help?
    Make sure you attend lectures and precepts. If you do not understand something, ask a question during precept. If you need more help, visit your preceptor during his or her office hours, or make an appointment. You can also ask your preceptor questions via e-mail. If your preceptor is unavailable you can contact the head TA, Rob Shillner. Read the COS 126 Newsgroup for late-breaking news and tips. Undergraduate lab TAs are there to help you with technical problems concerning the use of the computers and their software; they are not allowed to write code for you. If you need help with University issues (add/drop, etc) see Prof. Yao.
    I accidently deleted one of my files! What do I do?
    Each night, CIT saves copies of all files that were created or changed during the day. If you zap a file, send a message to restores@phoenix asking for the most-recent backup copy. Be sure to specify the full path for the file, e.g., send a message like

    Please restore /u/drh/4/rat.c from the most recent backup. Thanks, dave h.

    Your home directory is named "/u/yourlogin". You'll need to re-edit the restored file to incorporate the changes you made between the time it was saved and the time you zapped it. You can also use the /u/cs126/bin/submit command to save copies of your files. When you have part of your program working, submit it, which makes a copy in the COS 126 submission directory. Later, when you complete your program, submit it again. Only the most recent copy is saved, if you accidently delete a file, we can email the most recently submitted copy back to you.
    What does the error message "cpp: hello.c:10 No newline at end of file" mean?
    Your file (hello.c in this case) doesn't end with a new-line character. You can add some by editing the file, positioning the cursor just after the last "}", and hitting the Enter key a couple of times.
    How to I put my name and precept number in C programs, like hello.c?
    You put them in a comment, which is text enclosed in a /* */ pair, e.g., add the line
    /* Dave Smith, precept 1 */
    to the beginning of your program. Don't forget the closing */.
    When I type "lcc hello.c", the computer says "lcc: Command not found", and when I type "a.out", it says "a.out: Command not found". What did I do wrong?
    You did nothing wrong. The problem is that you don't have "." and /usr/princeton/bin in your path. Add the line
    set path=( . /usr/princeton/bin $path )
    to your ".cshrc" file, creating .cshrc if necessary. If you already have a set path statement in .cshrc (see below), you can combine them into the one statement
    set path=( . /usr/princeton/bin /usr/princeton/bin/X11 /u/cs126/bin $path )
    What is a "path" and how do I add /usr/princeton/bin/X11 and /u/cs126/bin to it?
    See pp. 138-9 in Hahn, Student Guide to UNIX. To change your path, add the line
    set path=( /usr/princeton/bin/X11 /u/cs126/bin $path )
    to the file ".cshrc" (that's "dot" c s h r c) in your login directory.
    How do I configure Netscape 3.0 so I can browse the lecture slides?
    Launch netscape-3.0. Follow the menus and tabbed dialogs to the "Helpers" page:

    General Preferences

    Highlight "application/pdf" (scrolling to it, if necessary), click "Edit", and click the "Plug in" box. Then click the "OK" buttons to back out of this briar patch.You should then be able to browse the Acrobat PDF files for the lectures.
    How do I change precepts?
    See Mrs. McDermott in CS Bldg. 410; you can also send her email at dmcd@cs.

    Copyright © 1996 David R. Hanson /
    $Revision: 1.14 $ $Date: 1996/12/06 15:11:52 $