6 main (int argc, char* argv[])
11 ht = cos_make_hash_table ();
14 printf ("Can't make hash table.\n");
18 cos_hash_table_put (ht, cos_make_char ('A'),
19 cos_build_string ("character A"));
20 cos_hash_table_put (ht, cos_make_char ('a'),
21 cos_build_string ("character a"));
22 cos_hash_table_put (ht, cos_make_int (65),
23 cos_build_string ("int 65"));
24 cos_hash_table_put (ht, cos_intern ("sym"),
25 cos_build_string ("symbol `sym'"));
27 obj = cos_make_char ('A');
28 cos_print_object (obj);
30 cos_print_object (cos_hash_table_get (ht, obj));
33 obj = cos_make_char ('a');
34 cos_print_object (obj);
36 cos_print_object (cos_hash_table_get (ht, obj));
39 obj = cos_make_int (65);
40 cos_print_object (obj);
42 cos_print_object (cos_hash_table_get (ht, obj));
45 obj = cos_intern ("sym");
46 cos_print_object (obj);
48 cos_print_object (cos_hash_table_get (ht, obj));
51 obj = cos_intern ("symbol");
52 cos_print_object (obj);
54 cos_print_object (cos_hash_table_get (ht, obj));