Arguments passed by reference must be matched with
equivalent data types. No casting shall be permitted. See Section 5.8.1,
Equivalent Types.
Arguments passed
by reference are not copied into the subroutine area,
rather, a reference to the original argument is passed to the subroutine. The
subroutine can then access the argument data via the reference. Arguments
passed by reference must be matched with equivalent data types. No casting shall be permitted. See Section 5.8.1,
Equivalent Types. No casting shall be permitted. To
indicate argument passing by reference, the argument declaration is preceded by
the ref keyword. The general syntax is:
The syntax to declare a default argument in a subroutine is:
subroutine( [direction] [type] argument = default_value
);
The default_value is any expression that is
visible at the current scope. It can include any combination of constants or
variables visible at the scope of both the caller and the subroutine.
The optional direction can be either input, inout, or ref (output ports can not specify
defaults).
The default_value is an expression. The expression is
evaluated in the scope of the caller each time the subroutine is called. The
elements of the expression must be visible at the scope of subroutine and, if
used, at the scope of the caller. If the default_value is not used, the expression is not
evaluated and need not be visible at the scope of the caller. Note that default
values are only allowed with the ANSI style declaration.