switch ( Expression ) ScopeStatement

Derek Parnell derek at psych.ward
Mon Jul 6 17:18:46 PDT 2009


I see that the syntax for 'switch' is ...
 
   switch ( Expression ) ScopeStatement

and ScopeStatement is either a BlockStatement or a NonEmptyStatement.

Meaning that 

  switch (i) j = k;

is valid syntax! Why is that?

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell


More information about the Digitalmars-d-learn mailing list