"Typically" here is used to indicate advice to the reader. There is no "rule" in effect. So "y = x" is illegal in a static method since "x" is not static. Gord. Alok Kumar Sinha wrote: > Hi, > > According to LRM 1800-2005 section 7.18, > > "Typically, global constants are also declared static because they are > the same for all instances of the class." > > Does it mean that global constants should be implicitly considered as > static or static keyword should be mentioned > explicitly? > > What should be the behaviour of the following testcase: > > module top; > class C; > const int x = 1; > static int y; > static function void f(); > y = x ; // Legal or illegal for the use of 'x' ? > endfunction > endclass > > C c = new; > endmodule > > Thanks and Regards > Alok > > > > -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Dec 29 06:58:09 2008
This archive was generated by hypermail 2.1.8 : Mon Dec 29 2008 - 07:00:23 PST