[clean-list] eof for console input

isaac gouy igouy@yahoo.com
Tue, 18 Mar 2003 12:39:04 -0800 (PST)


Trying to use file redirection with windows xp, like-

>testprog -con < inputfile.txt

I haven't been able to figure out how to check for eof
when using freadline with the console. As an extreme
example, if inputfile.txt is an empty file, this
program just gives the message "Heap full."

Start:: *World -> String
Start world  
	#	(console, world) = stdio world
	#	(line, console) = freadline console
	#	(ok, world) = fclose console world
	= line

So 2 questions:
- what's happening to use up heap space?
- as sfend and fend cannot be used with the console,
how can I check for eof?

best wishes, Isaac


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com