Print

Print


>> it's implied that it reads the whole file.
>> I use Haskell, and readFile, reads the whole file, and returns a string.
>>
>> can't imagine what else it would do.
>> not read the file? i dono, it's a curiosity.
>
>Well, that's the modern way. In the ancient days when
>COBOL was developed, computer memories were very small,
>so the READ statement only read one record.

Haskell actually does one better.  Since the program don't use any records, it doesn't read 
any.  It's quite useful for one-pass processing of a file.  Also useful for zero-pass 
processing.