Function to print a diamond shape

Ali Çehreli acehreli at yahoo.com
Thu Mar 20 14:34:14 PDT 2014


On 03/20/2014 02:30 PM, Justin Whear wrote:

 > What's the appropriate output for an even number?

Great question! :) Size must be odd. I have this in my function:

     enforce(size % 2,
             format("Size cannot be an even number. (%s)", size));

Ali



More information about the Digitalmars-d-learn mailing list