>From: "Ryan, Ray" <Ray_Ryan@mentor.com> >In section 18.7 the 'get_coverage' method is defined as a static method. >It is also defined as having 'ref' arguments. > >However, in section 12.4.2 it states: >"It shall be illegal to use argument passing by reference for >subroutines with a lifetime of static." Actually, I don't think this is a problem, aside from being confusing. The get_coverage method is a static method, but it is presumably an automatic task, so it is still legal to use ref args with it. The term 'static' has been overloaded for two different things, which is confusing. Those two things come together in a class method, which brings out the confusion. A static method can only access static members of a class. A subroutine with a lifetime of static has arguments and variables that have static lifetimes. These are two different things. You can declare a static method that is an automatic task with "static task automatic mytask" or get it by default with "static task mytask". Note the syntactic difference of having the qualifier before the word task versus after it, which gives the two different semantic meanings. In this particular case, we might want to change 12.4.2 to say "It shall only be legal to use argument passing by reference for subroutines with a lifetime of automatic." But some confusion is inevitable with this overloading of the keyword. Steven Sharp sharp@cadence.comReceived on Tue Apr 11 10:51:13 2006
This archive was generated by hypermail 2.1.8 : Tue Apr 11 2006 - 10:51:36 PDT