![]() |
Programming I version 1.5.3
Programming I C Library
|
The Programming I C Library defines basic data types and functions to simplify C programming for beginners and to enable the step-by-step design approach outlined in the script. It contains facilities for testing code, e.g., functions for comparing actual and expected return values.
Download the library with examples from the script:
prog1lib-1.5.3.zip
Extract the zip file, go to directory prog1lib/lib, make libprog1.a, go to directory prog1lib/script_examples, make celsius_to_fahrenheit (or any other example from the script). In more detail, assuming that you have opened the terminal (on Linux or Mac) or installed MinGW (on Windows, including the bin class of msys-wget, msys-zip, msys-unzip), perform these steps:
cd DirectoryToWhichYouDownloadedTheLibrary
unzip prog1lib-1.5.3.zip
cd prog1lib/lib
make
cd ../script_examples
make celsius_to_fahrenheit
./celsius_to_fahrenheit
C:\MinGW\msys\1.0\home\MyUserName C:\MinGW\msys\1.0\msys.bat ls -l prog1lib directory: unzip prog1lib-1.5.3.zip unzip is not available, install it via the MinGW setup. (See the exercise slides for more details.)lib directory: cd prog1lib/lib make cd ../script_examples make celsius_to_fahrenheit ./celsius_to_fahrenheit
or celsius_to_fahrenheit.exe make wages && ./wages Functions for output, input, testing, assertions, etc. contained in base.h.