Proposal for a Rosettacode task

bearophile bearophileHUGS at lycos.com
Sat Oct 19 03:58:10 PDT 2013


Adam D. Ruppe:

> sure. I didn't format it but if you convert my tabs to spaces 
> and maybe break up some long lines it should be good.

Good, I have reformatted the code (I have chosen a narrow 72/73 
line width for the code in that site, to see it well on smaller 
screens or larger fonts), and I have tried to improve it a little 
in many details:

http://rosettacode.org/wiki/ASCII_art_diagram_converter

The signature of the nested routine now takes all the variables 
it works on. I think this code makes it more clear that this 
routine needs to modify all those variables:

     static void commitCurrent(ref uint anonCount,
                               ref uint totalBits,
                               ref uint currentBits,
                               ref string code,
                               ref string currentName) pure @safe {

If you want to modify code I suggest you to modify it directly on 
that site.

Bye,
bearophile


More information about the Digitalmars-d mailing list