www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - wikibooks.org

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
The page at 
http://en.wikibooks.org/wiki/D_(The_Programming_Language)/d2/Lesson_1/Phobos 
has a few inaccuracies (for example claims that writefln and writeln are 
the same). Is the person maintaining it on this newsgroup?

Andrei
Aug 14 2010
parent reply "Nick Sabalausky" <a a.a> writes:
"Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> wrote in message 
news:i467if$1rn2$2 digitalmars.com...
 The page at 
 http://en.wikibooks.org/wiki/D_(The_Programming_Language)/d2/Lesson_1/Phobos 
 has a few inaccuracies (for example claims that writefln and writeln are 
 the same). Is the person maintaining it on this newsgroup?

I don't know who originally created it, but I went ahead and removed the writefln==writeln claim and also added some info on nested comments. It should probably still be changed to use write and writeln for the hello world examples, and then introduce writef and writefln as formatted versions. Sending a non-format-string as the first arg to writef or writefln should *not* be encouraged. I might do that and some other things later if I have time.
Aug 14 2010
next sibling parent reply Bernard Helyer <b.helyer gmail.com> writes:
On Sat, 14 Aug 2010 14:29:44 -0400, Nick Sabalausky wrote:
 Sending a non-format-string as the first arg to
 writef or writefln should *not* be encouraged.

Interestingly enough, the example on the Digital Mars D2 website does exactly that. http://www.digitalmars.com/d/2.0/ "writefln("Hello World, Reloaded");"
Aug 14 2010
parent reply Walter Bright <newshound2 digitalmars.com> writes:
Bernard Helyer wrote:
 On Sat, 14 Aug 2010 14:29:44 -0400, Nick Sabalausky wrote:
 Sending a non-format-string as the first arg to
 writef or writefln should *not* be encouraged.

Interestingly enough, the example on the Digital Mars D2 website does exactly that. http://www.digitalmars.com/d/2.0/ "writefln("Hello World, Reloaded");"

No it doesn't :-)
Aug 14 2010
parent reply Walter Bright <newshound2 digitalmars.com> writes:
Bernard Helyer wrote:
 On Sat, 14 Aug 2010 17:46:27 -0700, Walter Bright wrote:
 No it doesn't :-)

I must be losing my mind! :P

Either that or I cheated!
Aug 14 2010
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Walter Bright wrote:
 Bernard Helyer wrote:
 On Sat, 14 Aug 2010 17:46:27 -0700, Walter Bright wrote:
 No it doesn't :-)

I must be losing my mind! :P

Either that or I cheated!

Probably he quickly changed the website. Andrei
Aug 15 2010
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
--e0cb4e88781bb53e5a048dd242a2
Content-Type: text/plain; charset=ISO-8859-1

Many examples from the docs have writef's where there should be write's. I'm
guessing most of them were copy-pasted for D2 from the D1 pages. :p

On Sun, Aug 15, 2010 at 2:40 AM, Bernard Helyer <b.helyer gmail.com> wrote:

 On Sat, 14 Aug 2010 14:29:44 -0400, Nick Sabalausky wrote:
 Sending a non-format-string as the first arg to
 writef or writefln should *not* be encouraged.

Interestingly enough, the example on the Digital Mars D2 website does exactly that. http://www.digitalmars.com/d/2.0/ "writefln("Hello World, Reloaded");"

--e0cb4e88781bb53e5a048dd242a2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Many examples from the docs have writef&#39;s where there should be write&#= 39;s. I&#39;m guessing most of them were copy-pasted for D2 from the D1 pag= es. :p<br><br><div class=3D"gmail_quote">On Sun, Aug 15, 2010 at 2:40 AM, B= ernard Helyer <span dir=3D"ltr">&lt;<a href=3D"mailto:b.helyer gmail.com">b= .helyer gmail.com</a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde= r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class=3D"im"=
On Sat, 14 Aug 2010 14:29:44 -0400, Nick Sabalausky wrote:<br>

&gt; writef or writefln should *not* be encouraged.<br> <br> </div>Interestingly enough, the example on the Digital Mars D2 website does= <br> exactly that.<br> <br> <a href=3D"http://www.digitalmars.com/d/2.0/" target=3D"_blank">http://www.= digitalmars.com/d/2.0/</a><br> <br> &quot;writefln(&quot;Hello World, Reloaded&quot;);&quot;<br> </blockquote></div><br> --e0cb4e88781bb53e5a048dd242a2--
Aug 14 2010
prev sibling next sibling parent Bernard Helyer <b.helyer gmail.com> writes:
On Sat, 14 Aug 2010 17:46:27 -0700, Walter Bright wrote:
 No it doesn't :-)

I must be losing my mind! :P
Aug 14 2010
prev sibling parent Bernard Helyer <b.helyer gmail.com> writes:
On Sun, 15 Aug 2010 07:43:54 -0500, Andrei Alexandrescu wrote:

 Walter Bright wrote:
 Bernard Helyer wrote:
 On Sat, 14 Aug 2010 17:46:27 -0700, Walter Bright wrote:
 No it doesn't :-)

I must be losing my mind! :P

Either that or I cheated!

Probably he quickly changed the website. Andrei

http://images2.wikia.nocookie.net/__cb20090819180841/uncyclopedia/ images/1/13/Thats_the_joke.jpg
Aug 15 2010