The enum *variable* is not static, the enum type values *are*. jan, feb, and mar are static, but month is not. Shalom > -----Original Message----- > From: Ishita Ghosh [mailto:ighosh@cal.interrasystems.com] > Sent: Tuesday, December 30, 2008 1:40 PM > To: Bresticker, Shalom; sv-bc@eda.org > Subject: Re: [sv-bc] Query regarding constant class property > > > According to LRM 1800-2005 Sec 7.9 > "Access to nonstatic members or to the special this handle > within the body of a static method is illegal" > > So, if the use of enum element in a static method, as in the > given testcase, is allowed then it implies that the enum > variable though explicitly not declared as 'static' > is being implicitly considered as 'static'. Correct me if I am wrong. > > Regards, > Ishita > > Bresticker, Shalom wrote: > > >Why not? > > > >Shalom > > > > > > > >>-----Original Message----- > >>From: Ishita Ghosh [mailto:ighosh@cal.interrasystems.com] > >>Sent: Tuesday, December 30, 2008 12:07 PM > >>To: Bresticker, Shalom; sv-bc@eda.org > >>Subject: Re: [sv-bc] Query regarding constant class property > >> > >>Is the use of enum element legal in a static method of a class? > >> > >>Rgards, > >>Ishita > >> > >>Bresticker, Shalom wrote: > >> > >> > >> > >>>What is the problem? > >>> > >>>Shalom > >>> > >>> > >>> > >>> > >>> > >>>>-----Original Message----- > >>>>From: owner-sv-bc@server.eda.org > >>>>[mailto:owner-sv-bc@server.eda.org] On Behalf Of Ishita Ghosh > >>>>Sent: Tuesday, December 30, 2008 11:25 AM > >>>>To: sv-bc@server.eda.org > >>>>Subject: RE: [sv-bc] Query regarding constant class property > >>>> > >>>>Hi, > >>>> > >>>> Please suggest on the behaviour of the following testcase : > >>>> > >>>>module top; > >>>> > >>>> class C; > >>>> typedef enum {jan, feb, mar} month; > >>>> static int y; > >>>> static function void f(); > >>>> y =jan; // legal or illegal ?? > >>>> endfunction > >>>> endclass > >>>> > >>>> C c = new; > >>>>endmodule > >>>> > >>>> The standard simulators are generating no error message. > >>>> > >>>>Thanks and Regards, > >>>>Ishita > >>>> > >>>> > >--------------------------------------------------------------------- > >Intel Israel (74) Limited > > > >This e-mail and any attachments may contain confidential > material for > >the sole use of the intended recipient(s). Any review or > distribution > >by others is strictly prohibited. If you are not the intended > >recipient, please contact the sender and delete all copies. > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Dec 30 04:41:53 2008
This archive was generated by hypermail 2.1.8 : Tue Dec 30 2008 - 04:42:38 PST