/*========================================================================== * testflatio.d * Written in the D Programming Language (http://www.digitalmars.com/d) */ /*************************************************************************** * * * * * Authors: William V. Baxter III * Date: 14 Feb 2008 * Copyright: (C) 2008 William Baxter */ //=========================================================================== module testflatio; import flatio; alias format fmt; alias formatln fmtln; void endmark() { formatln("#"); } void main() { print ("hello"); endmark; print (1); endmark; print (3.14); endmark; print ('b'); endmark; print (1, 2, 3); endmark; print ("abc", 1, 2, 3); endmark; print ("abc", 1, 2) ("foo"); endmark; print ("abc") ("def") (3.14); endmark; format ("abc {}", 1); endmark; format ("abc {}:{}", 1, 2); endmark; format ("abc {1}:{0}", 1, 2); endmark; format ("abc ", 1); endmark; print ("hello world") (); endmark; print ("hello world").flush; endmark; format ("hello {}", "world") (); endmark; format ("hello {}", "world").flush; endmark; print ("hello ") ("world").newline; endmark; format ("hello {}", "world").newline; endmark; formatln ("hello {}", "world"); endmark; fmt ("abc {1}:{0}", 1, 2); endmark; fmtln ("abc {1}:{0}", 1, 2); endmark; } //--- Emacs setup --- // Local Variables: // c-basic-offset: 4 // indent-tabs-mode: nil // End: