Parenthesis

NN nn-mail at bk.ru
Sat Dec 23 05:56:33 PST 2006


You do not have an ambuity because you will allways write curly brackets:

if a == b { return 1; } else { return 2 }

This can solve the problem with forgetting the curly brackets:

if(a == b)
  writefln("a");
  return 1;

if a == b
{ // You must write this
  writefn("a");
  return 1;
} // You must write this



More information about the Digitalmars-d mailing list