RE: [sv-bc] "Assignment ... to a constant expression"

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Sun Apr 27 2008 - 04:25:33 PDT
The other side of this is whether something like the following works:

parameter c = 1;
begin
  int c = c ; // does the RHS reference the variable c or the parameter
c?
end

I might go to the safe at the entrance to the building to take my pistol
and shoot someone who writes this way, but the question is whether it is
legal (the code, not the pistol...)

Shalom 

> -----Original Message-----
> From: owner-sv-bc@server.eda.org 
> [mailto:owner-sv-bc@server.eda.org] On Behalf Of Bresticker, Shalom
> Sent: Sunday, April 27, 2008 2:18 PM
> To: sv-bc
> Subject: RE: [sv-bc] "Assignment ... to a constant expression"
> 
> Making this illegal would break back-compatibility.
> But I don't know how common this is.
> One could have written 
> 
> Colors c = red ;
> 
> Other forms of this would be
> 
> enum { red, green, blue, yellow } c = red; enum { red, green, 
> blue, yellow } c = c.first;
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sun Apr 27 04:27:39 2008

This archive was generated by hypermail 2.1.8 : Sun Apr 27 2008 - 04:28:05 PDT