On Thursday, 6 July 2017 at 09:11:44 UTC, Ola Fosheim Grøstad wrote:
ubyte[256] data;

if  (data.length > 0) {
   ubyte i = 0;
   do {
        writeln(i);
    } while ((++i) != cast(ubyte)data.length);
}

You also need to add an assert before the if to check that the last index can be represented as an ubyte. So probably not worth it.


Reply via email to