annotate tests/mini/strings1.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents test/strings1.d@d9d5d59873d8
children
rev   line source
lindquist@21 1 module strings1;
lindquist@270 2 extern(C) int printf(char*, ...);
lindquist@21 3 void f(char[11] buffer)
lindquist@21 4 {
lindquist@21 5 printf("%.*s\n", buffer.length, buffer.ptr);
lindquist@21 6 }
lindquist@21 7
lindquist@21 8 void main()
lindquist@21 9 {
lindquist@21 10 char[11] buffer;
lindquist@21 11 char[] hello = "hello world";
lindquist@21 12 {buffer[] = hello[];}
lindquist@21 13 {f(buffer);}
lindquist@21 14 {f("eleven char");}
lindquist@21 15 }