ocaml input_char
===

I am trying to read a char from a file being passed in via the stdinput in ocaml. I was wondering why I keep getting a unit when I can print_char the char that I receive in the following code. Also, I am trying to make a list of these characters which will not work as of now.

    let () =
	let charList = [] in 
  	let inchar = open_in Sys.argv.(1) in
  		try 
				while true do
					let c = Char.uppercase(input_char inchar) in
						print_char c; print_int (List.length charList);c::charList
				done
  		with End_of_file -> close_in inchar;(*; print_int (List.length charList); printTest charList;*)
 ;;