annotate test/strings1.d @ 21:8d45266bbabe trunk

[svn r25] * Fixed a lot of problems with string literals * Fixed slice-slice copying assignment
author lindquist
date Thu, 04 Oct 2007 07:01:15 +0200
parents
children d9d5d59873d8
rev   line source
lindquist@21 1 module strings1;
lindquist@21 2
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 }