Hi,
As per SV 1800 LRM:
A string or a string literal can be assigned directly to a string
variable. Integral types can be assigned to a string variable, but
require a cast.
This imposes some restriction when LHS of an assignment is a string
type. But is any data type allowed to be LHS when RHS is a string. I
did not see anything in the LRM, though following e.g. is marked as
illegal:
string b = "";
string a = {"Hi", b};
a[0] = b; // invalid, requires a cast
It is not at all clear why the assignment is invalid, how it can be
made valid by casting on which side. Most of the simulators pass the
case though. Is there any mantis or clarification for that?
--
Regards
Surya
--
This message has been scanned for viruses and
dangerous content by
MailScanner, and is
believed to be clean.
Received on Sat Jan 26 04:24:13 2008