The Thermopylae excerpt of TDPL available online
Leandro Lucarella
llucax at gmail.com
Thu Oct 29 09:21:45 PDT 2009
Andrei Alexandrescu, el 28 de octubre a las 23:38 me escribiste:
> It's a rough rough draft, but one for the full chapter on arrays,
> associative arrays, and strings.
>
> http://erdani.com/d/thermopylae.pdf
>
> Any feedback is welcome. Thanks!
It looks very nice. A small error in 4.1.7 first code block:
auto a = new double[4]; // must be already allocated
auto a1 = [ 0.5, -0.5, 1.5, 2 ];
auto a2 = [ 3.5, 5.5, 4.5, -1 ];
a[] = (a1[] + a2[]) / 2; // take the average of b and c
^^^^^^^^^^^^^^^^^^^^^^^^^^^
take the average of a1 and a2?
(I think it would be easier to follow using b and c though ;)
--
Leandro Lucarella (AKA luca) http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Cuando intenté arrimarle mi brazo
Se puso a hablar de Miller, de Anais Nin y Picasso
Y si osaba intentar robarle un beso
Se ponía a leer de Neruda unos versos
Me hizo mucho mal la cumbiera intelectual
More information about the Digitalmars-d
mailing list