readln() returns new line charater

Regan Heath regan at netmail.co.nz
Mon Dec 30 09:44:15 PST 2013


On Mon, 30 Dec 2013 13:51:46 -0000, Jakob Ovrum <jakobovrum at gmail.com>  
wrote:

> On Monday, 30 December 2013 at 12:36:15 UTC, Regan Heath wrote:
>> Cue "empty vs null" theme music..
>
> Empty vs null is not a factor here. It returns a string containing the  
> line terminator(s) for an empty line, but an empty string (incidentally  
> non-null) if the file is closed.

Yes .. but it /could/ have returned null for file closed and /an empty  
line/ for /an empty line/ .. what an idea!  Then the readln/writeln <-  
whoops bug "problem" vanishes too, bonus!

Nevermind.

R

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list