Re: Is this a bug?
- To: mathgroup at smc.vnet.net
- Subject: [mg13386] Re: Is this a bug?
- From: jfreeze at lexmark.com
- Date: Thu, 23 Jul 1998 03:32:32 -0400
- Sender: owner-wri-mathgroup at wolfram.com
The following seems to be a bug. In the first example, both the true and the false parts of If are being evaluated. In the secon example, only the true part. If this is not a bug, could someone please explain this behavior to me. Thanks In:= Clear[x,y]; If[True,Evaluate[ToExpression["x=5"]],Evaluate[ToExpression["y=5"]]]; Print[x,y]; Out:= 55 In:= Clear[x,y]; If[True,x=5,y=5]; Print[x,y]; Out:= 5y