Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
20:42bf2eb2973b | 21:8d45266bbabe |
---|---|
1 module strings1; | |
2 | |
3 void f(char[11] buffer) | |
4 { | |
5 printf("%.*s\n", buffer.length, buffer.ptr); | |
6 } | |
7 | |
8 void main() | |
9 { | |
10 char[11] buffer; | |
11 char[] hello = "hello world"; | |
12 {buffer[] = hello[];} | |
13 {f(buffer);} | |
14 {f("eleven char");} | |
15 } |