Skip to main content

One doc tagged with "Syntax"

View All Tags

Always use a Brace

In C, C++, Java, and other languages, you use curley-braces — '\{' and '\}' — to indicate the start and the end of a block of code.  However, the braces are optional if the block is only a single line.  This is an option you should never use.  Always use the brace, even if it is a single line.