[sv-bc] Query regarding constant class property

From: Alok Kumar Sinha <aksinha_at_.....>
Date: Mon Dec 29 2008 - 05:39:35 PST
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




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Dec 29 05:51:11 2008

This archive was generated by hypermail 2.1.8 : Mon Dec 29 2008 - 05:53:36 PST