
(*********************************************************************

        Adapted from
        Roman E. Maeder: Programming in Mathematica,
        Second Edition, Addison-Wesley, 1991.

 *********************************************************************)


ReadLoop[fileName_String] :=
	Module[{file, expr},
		file = OpenRead[fileName];
		If[ file === $Failed, Return[] ];
		While[ True,
			expr = Read[file];
			If[ expr === EndOfFile, Break[] ];
			Print["expr is ", expr]
		];
		Close[file]
	]
