is this right??

BCS none at anon.com
Tue Jun 16 23:47:41 PDT 2009


Hello hasen,

> hasen wrote:
> 
>> BCS wrote:
>> 
>>> void main()
>>> {
>>> int s;
>>> mixin("s") = 5;
>>> }
>>> -----
>>> Line 4: found '=' when expecting ';'
>>> http://www.digitalmars.com/d/1.0/expression.html#MixinExpression
>>> 
>> mixin *expression*
>> 
>> (4+3) = 5;
>> 
> Oh, never mind,
> 
> AssignExpression can be of the form:
> 
> ConditionalExpression = AssignExpression
> 
> my bad.

Irony: I wrote a lib that abuses the grammer to allow exactly that kind of 
syntax <g>

http://www.dsource.org/projects/scrapple/browser/trunk/backmath




More information about the Digitalmars-d-learn mailing list