C Programming

Project: Due 1:30PM 28 November 2005

Assignment: due 1:40pm, Tuesday 31 October 2005

String Assignment

Bitwise Assignment

Workshop Notes

Lecture notes I have written that you may find useful

Getting TC Lite [sic] to work

The following assumes that you are logged on with Administrator privileges. Since that is the (amazingly insecure) default with Microsoft, you may assume that this is the case if you do not know otherwise.
  1. Determine what drive you want to install onto -- you can look in Windows Explorer to find this out. Let us assume for this example that you want to install on the C: drive.
  2. Put the floppy disk into your computer
  3. Open a Command Prompt window by choosing Start --> All Programs --> Accessories --> Command Prompt
  4. In the command prompt, type:
    a:
    cd tclite_zip
    install c:
    
    Note that if you want to install onto another drive, such as D:, then you would type
    install d:
    instead of
    install c:
To add C:\TCLITE\BIN to your PATH environment variable: Windows XP, Windows 2000
  1. Start --> right click on "My Computer" --> select "Properties" from the menu --> click on "Advanced" tab --> "Environment Variables" tab near the bottom --> click on "Path" in the "System Variables" window panel near the bottom -> click on the "Edit" button.
  2. VERY IMPORTANT: Press the "End" key on your keyboard to go to the end of what is already on your PATH. Do not delete the existing content of your PATH variable. If you accidentally do so, click "Cancel", and press "Edit" again.
  3. Add the following at the end of what is already the value of the PATH variable:
      ;C:\TCLITE\BIN
    For example, after I have done that, my PATH variable looks something like this:
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\TCLITE\BIN
  4. Click all the "OK" buttons to close all the windows that you have opened.
To add C:\TCLITE\BIN to your PATH environment variable: Windows 9x, Windows ME
  1. Edit C:\autoexec.bat; create it if it does not exist, using a text editor such as notepad, wordpad, edit, ...
  2. Put into the file C:\autoexec.bat the following:
    set PATH=%PATH%;C:\TCLITE\BIN
  3. Save the file
  4. Make sure that it was saved as C:\autoexec.bat and not C:\autoexec.bat.txt  This is a little bit tricky, as Microsoft software is so user friendly that it protects you from knowing what you are doing  :-)
To start TCLITE:
  1. Open a command prompt, as above
  2. Type
    TC
To tell TCLITE where the libraries and include files are:
  1. Start TCLITE
  2. Select Options --> Directories
  3. In the dialog box, enter the full path name for the Include directory and the Library directory. On my machine, that would be:
    C:\TCLITE\INCLUDE
    and
    C:\TCLITE\LIB
    Note that previously there was no drive letter. You need the drive letter there.
  4. select "OK" or whatever options save the values you have just entered.
To run in full screen mode

To make an icon on your desktop:
  1. Open Windows Explorer
  2. Browse to the C:\TCLITE\BIN directory.
  3. Right-click on the TC icon
  4. Select "Send to..." --> "Desktop (make shortcut)"

Useful resources

Thanks to Peter Bishop, who sent me these links in an email: