diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/strings1.d	Thu Oct 04 07:01:15 2007 +0200
@@ -0,0 +1,15 @@
+module strings1;
+
+void f(char[11] buffer)
+{
+    printf("%.*s\n", buffer.length, buffer.ptr);
+}
+
+void main()
+{
+    char[11] buffer;
+    char[] hello = "hello world";
+    {buffer[] = hello[];}
+    {f(buffer);}
+    {f("eleven char");}
+}