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

From: Steven Sharp <sharp@cadence.com>
Date: Thu Feb 06 2014 - 07:15:10 PST
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] On Behalf Of Graham, Paul
Sent: Thursday, February 06, 2014 6:43 AM
To: 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, and is
believed to be clean.
Received on Thu Feb 6 07:15:31 2014

This archive was generated by hypermail 2.1.8 : Thu Feb 06 2014 - 07:15:36 PST