Leandro Lucarella wrote:
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 ;)

Thanks! I fixed that to have a and b as sources and c as destination.

Andrei

Reply via email to