[sv-bc] RE: Type rules for subprogram arguments

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Thu Feb 06 2014 - 22:22:32 PST
The most explicit statement for input arguments is in 10.8, which says,

"An assignment-like context is as follows:...
- The passing of a value to a subroutine input, output, or inout port".

I agree that the statement you quoted could be confusing.

Shalom


From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Graham, Paul
Sent: Thursday, February 06, 2014 17:47
To: Steven Sharp; sv-bc@eda.org
Subject: [sv-bc] RE: Type rules for subprogram arguments

Steve,

Thanks.  I figured that it was, but couldn't find any place in the lrm that actually said it.

Paul
________________________________
From: owner-sv-bc@eda.org<mailto:owner-sv-bc@eda.org> [owner-sv-bc@eda.org] on behalf of Steven Sharp [sharp@cadence.com]
Sent: Thursday, February 06, 2014 10:15 AM
To: Graham, Paul; sv-bc@eda.org<mailto:sv-bc@eda.org>
Subject: [sv-bc] RE: Type rules for subprogram arguments
Argument passing is treated like an assignment, so it would need to be assignment compatible.


From: owner-sv-bc@eda.org<mailto:owner-sv-bc@eda.org> [mailto:owner-sv-bc@eda.org] On Behalf Of Graham, Paul
Sent: Thursday, February 06, 2014 6:43 AM
To: sv-bc@eda.org<mailto:sv-bc@eda.org>
Subject: [sv-bc] Type rules for subprogram arguments

Are there rules for the required type of a subprogram argument?  For a ref argument, the lrm says:

    Arguments passed by reference shall be matched with equivalent data types

For an input argument, the only rule I see is:

    If an argument in the subroutine is declared as an input, then the corresponding expression in the
    subroutine call can be any expression.

"Any expression", eh?  Do the types not have to match in some sense?

Paul

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Feb 6 22:23:13 2014

This archive was generated by hypermail 2.1.8 : Thu Feb 06 2014 - 22:23:18 PST