An effort at creating a free ebook for learning D

Jimmy Cao jcao219 at gmail.com
Mon Jun 20 15:17:13 PDT 2011


On Mon, Jun 20, 2011 at 5:13 PM, Kai Meyer <kai at unixlords.com> wrote:

> On 06/20/2011 03:46 PM, Jose Armando Garcia wrote:
>
>> On Mon, Jun 20, 2011 at 6:30 PM, Jimmy Cao<jcao219 at gmail.com>  wrote:
>>
>>> I helped with something last summer: an attempt at creating a wikibook
>>> for
>>>
>>> D.  At that time, my D skills were very bad, so I had to concentrate on
>>> learning D first before contributing to more lessons.
>>> One thing that has always bothered me is, there aren't many good *free*
>>> ebooks for learning D.
>>> Well, I'll try to continue what I had started less than a year ago.  I'll
>>> probably make many mistakes while writing, so can you guys check on my
>>> progress once in a while?
>>> http://en.wikibooks.org/wiki/**D_(The_Programming_Language)/**
>>> d2/Lesson_1/Phobos<http://en.wikibooks.org/wiki/D_(The_Programming_Language)/d2/Lesson_1/Phobos>
>>> What do you think?
>>> Thanks.
>>>
>>
>> Good idea. Small notes:
>>
>> *) In the tip section 'write("Hello\n") and writeln("Hello")' are not
>> the same. writeln and writefln flush. write doesn't.
>> *) Not sure if you want to also encourage portable code. "\n" should
>> be replace with newline which I think it is define in std.string.
>>
>
> I wrote some code a while back that was intended to be portable (between
> windows and linux anyway). I used 'writef("Hello\n");' a lot, and those
> always printed correctly on windows. Does writef do something different than
> write with the '\n' character?
>
> -Kai Meyer
>

I think \n still shows up as a newline in windows, even though it is
supposed to be \r\n.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20110620/a061b5d0/attachment.html>


More information about the Digitalmars-d-learn mailing list