Re: [sv-bc] expressions not allowed in RHS or continous assign or on port connection list

From: Steven Sharp <sharp@cadence.com>
Date: Thu Apr 08 2010 - 13:41:44 PDT

>Date: Thu, 08 Apr 2010 13:31:31 -0700
>From: John Michael Williams <john@svtii.com>

>Minor point of terminology:
>
>I agree that the ++ operation in the argument list
>of a nonprocedural function call should not be allowed.
>However, I would not call it a "side effect".
>
>The increment is unrelated to the function; it is applied
>directly to the variable being used as a real parameter
>in the call. This is what makes it illegal. If it were
>in the function body, or perhaps applied to a formal
>parameter of the function, an increment of a variable declared
>outside the function would be causing what I would
>call a side effect.

I think you are fixating on the use of the term "side effect"
as a property of a function. It has a more general meaning.

I am not calling this a side effect of the function. I am calling
it a side effect of evaluating the expression. The main effect of
evaluating the expression is to get its value. Changing the values
of any variables in the process is a side effect of the evaluation.
This is a correct use of the term.

Steven Sharp
sharp@cadence.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Apr 8 13:42:00 2010

This archive was generated by hypermail 2.1.8 : Thu Apr 08 2010 - 13:42:04 PDT