Mercurial > projects > ldc
comparison test/bug54.d @ 91:3f949c6e2e9d trunk
[svn r95] added support for mains like:
T main(string[] args)
fixed a bug with slicing a pointer that is an argument with no storage
author | lindquist |
---|---|
date | Wed, 07 Nov 2007 04:52:56 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
90:16e88334bba7 | 91:3f949c6e2e9d |
---|---|
1 module bug54; | |
2 | |
3 extern(C) size_t strlen(char*); | |
4 | |
5 // creating args for main | |
6 void d_main_args(size_t n, char** args, ref char[][] res) | |
7 { | |
8 assert(res.length == n); | |
9 foreach(i,v; args[0..n]) | |
10 { | |
11 res[i] = v[0 .. strlen(v)]; | |
12 } | |
13 } | |
14 | |
15 void main() | |
16 { | |
17 } |