CS143-Lab/examples
2023-03-16 15:55:37 +00:00
..
arith.cl extract tar and init 2023-03-16 15:55:37 +00:00
atoi_test.cl extract tar and init 2023-03-16 15:55:37 +00:00
atoi.cl extract tar and init 2023-03-16 15:55:37 +00:00
book_list.cl extract tar and init 2023-03-16 15:55:37 +00:00
cells.cl extract tar and init 2023-03-16 15:55:37 +00:00
complex.cl extract tar and init 2023-03-16 15:55:37 +00:00
cool.cl extract tar and init 2023-03-16 15:55:37 +00:00
g1.graph extract tar and init 2023-03-16 15:55:37 +00:00
graph.cl extract tar and init 2023-03-16 15:55:37 +00:00
hairyscary.cl extract tar and init 2023-03-16 15:55:37 +00:00
hello_world.cl extract tar and init 2023-03-16 15:55:37 +00:00
io.cl extract tar and init 2023-03-16 15:55:37 +00:00
lam.cl extract tar and init 2023-03-16 15:55:37 +00:00
life.cl extract tar and init 2023-03-16 15:55:37 +00:00
life.cl~ extract tar and init 2023-03-16 15:55:37 +00:00
list.cl extract tar and init 2023-03-16 15:55:37 +00:00
new_complex.cl extract tar and init 2023-03-16 15:55:37 +00:00
palindrome.cl extract tar and init 2023-03-16 15:55:37 +00:00
primes.cl extract tar and init 2023-03-16 15:55:37 +00:00
README extract tar and init 2023-03-16 15:55:37 +00:00
sort_list.cl extract tar and init 2023-03-16 15:55:37 +00:00

The examples directory contains a few small and not so small
example programs which illustrate various aspects of the Cool
programming language.

	arith.cl	Tests various aspects of arithmetic in Cool.

	atoi.cl		An implementation of the C function by the
			same name. It converts a String into an Int.

	atoi_test.cl	An example program using atoi.cl. Since you
			will most likely use atoi.cl in the first
			assignment, you should study this example.

	list.cl		A very simple program showing how to create a
			list data type for integers. It illustrates
			inheritance and dynamic dispatch.

	book_list.cl	Illustrates inheritance and in particular the
			mechanism of STATIC DISPATCH and the CASE
			statement.

	cells.cl	Models a one-dimensional cellular automaton.

	cool.cl		An short and obscure program.

	io.cl		Shows how to use the IO class. (input/output)
	
 	hairyscary.cl	Exercises many of the obscure features of the
			language in obscure ways.			

	hello_world.cl  The classic first program.

	primes.cl	An unusual prime number generator.

	graph.cl	A program reading descriptions of weighted-
			directed graphs from stdin in text format.

	g1.graph	A sample input to graph.cl

	palindrome.cl	Recognizes palindromes.

	complex.cl	Checks the = operator and cummulative effects of
			method calls via a complex number object.

        life.cl         The classic Game of Life

	sort_list.cl	A more complex example sorting lists of integers.