annotate tests/mini/globals1.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/globals1.d@d9d5d59873d8
children
rev   line source
lindquist@21 1 module globals1;
lindquist@270 2 extern(C) int printf(char*, ...);
lindquist@21 3
lindquist@21 4 char[] gstr = "hello world";
lindquist@21 5
lindquist@21 6 void main()
lindquist@21 7 {
lindquist@21 8 printf("%.*s\n", gstr.length, gstr.ptr);
lindquist@21 9 char[] str = gstr;
lindquist@21 10 printf("%.*s\n", str.length, str.ptr);
lindquist@21 11 }