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

From: Graham, Paul <Paul_Graham@mentor.com>
Date: Thu Feb 06 2014 - 07:47:27 PST
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 [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
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] 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<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 22:10:38 2014

This archive was generated by hypermail 2.1.8 : Thu Feb 06 2014 - 22:10:50 PST