May 08, 2004 Why this has to be static? | ||||
---|---|---|---|---|
| ||||
Hey, this... int[][] array=[[0,1],[0,2],[0,3]]; /* failed! */ static int[][] array=[[0,1],[0,2],[0,3]]; /* OK */ Why it has to be static?. (In Java this doesn't happen, is something there I'm missing?) |
May 08, 2004 Re: Why this has to be static? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lord Syl | "Lord Syl" <Lord_member@pathlink.com> wrote in message news:c7iba7$kuh$1@digitaldaemon.com... > Hey, this... > > int[][] array=[[0,1],[0,2],[0,3]]; /* failed! */ static int[][] array=[[0,1],[0,2],[0,3]]; /* OK */ > > Why it has to be static?. (In Java this doesn't happen, is something there I'm > missing?) > Not implemented yet, here's a workaround: const int[][] const_array = [[0, 1], [0, 2], [0, 3]]; int[][] array = const_array; |
Copyright © 1999-2021 by the D Language Foundation