Hi,
As per LRM:
The new operation is defined as a function with no return type, and
like any other function, it must be non-blocking.
Even though new does not specify a return type, the left-hand side of
the assignment determines
the return type.
It is not clear from the text, which type of return statement is
allowed. Consider the following cases:
program class20;
class A;
bit b;
reg r;
A a;
function new(bit i, reg j);
b = i;
r = j;
return a;
endfunction
endclass
A a;
endprogram
Is the above case valid.
Also what will happen if only 'return;' is used?
--
Regards
Surya
--
This message has been scanned for viruses and
dangerous content by
MailScanner, and is
believed to be clean.
Received on Thu Jan 3 03:06:26 2008