585
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com>
|
|
6 // @date@ 20005-06-14
|
|
7 // @uri@ news:d8m7rs$mtv$2@digitaldaemon.com
|
|
8 // @desc@ misplaced initialisers in static rectangular array
|
|
9
|
|
10 module dstress.run.a.array_initialization_17_A;
|
|
11
|
|
12 const char[3][13] month = [
|
|
13 1: "Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
|
14 8: "Aug", "Sep", "Oct", "Nov", "Dec"
|
|
15 ];
|
|
16
|
|
17
|
|
18 int main(){
|
|
19 assert(month[1]=="Jan");
|
|
20 assert(month[6]=="Jun");
|
|
21 assert(month[8]=="Aug");
|
|
22 assert(month[12]=="Dec");
|
|
23
|
|
24 foreach(char c; month[0]){
|
|
25 assert(c==char.init);
|
|
26 }
|
|
27
|
|
28 foreach(char c; month[7]){
|
|
29 assert(c==char.init);
|
|
30 }
|
|
31
|
|
32 return 0;
|
|
33 }
|