Re: [sv-bc] RE: [sv-ec] svlog enum function usage & maven query

From: Greg Jaxon <Greg.Jaxon_at_.....>
Date: Mon Apr 28 2008 - 09:54:59 PDT
Steven Sharp wrote:
>> From: "Brad Pierce" <Brad.Pierce@synopsys.com>
>>
>> According to 13.5.5, the parentheses in a call to a nonvoid function
>> 'funct' cannot not be omitted, hence "funct.next" must refer to the
>> static variable "top.funct.next", which is initialized to "C" at time 0.
> 
> What if we move this code to the inside of a class, so that funct
> becomes a method (and declare the local variable 'next' to be
> explicitly static)?  According to 13.5.5, the parentheses can be
> omitted from a method function call.

I read 13.5.5 as allowing the parentheses to be optional in almost
all circumstances, except where needed to resolve the ambiguity of
recursive call vs referring to your own result variable.

What Steven says about access to static locals is absolutely right.
But only /static/ names are visible this way.  Methods, unlike functions,
are automatic (by default).  I think we should read the prototype
for the "next" enum method as if it was a class method.  Since
the keyword static is not given in 6.19.5.3, next is automatic, therefore
its result variable is not accessible via '.' notation.  That
means the ()s should not be needed to invoke .next in this context.

Greg


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Apr 28 09:56:05 2008

This archive was generated by hypermail 2.1.8 : Mon Apr 28 2008 - 09:56:23 PDT