Top "Curly-braces" questions

The symbols "{" and "}", commonly used in programming languages.

Can I make Visual Studio place curly braces on the same line as an if statement (in HTML)?

In Visual Studio while designing MVC views (in .aspx or .ascx files), I often use if statements. When I auto-format (…

visual-studio-2010 view formatting curly-braces
PHP - If/else, for, foreach, while - without curly braces?

Something that really would like to know but never found out are shortcuts in PHP. I am currently coding a …

php if-statement foreach curly-braces
What do curly braces in Java mean by themselves?

I have some Java code that uses curly braces in two ways // Curly braces attached to an 'if' statement: if(…

java syntax scope curly-braces
What's the purpose of using braces (i.e. {}) for a single-line if or loop?

I'm reading some lecture notes of my C++ lecturer and he wrote the following: Use Indentation // OK Never rely on …

c++ c coding-style curly-braces defensive-programming
PHP curly brace syntax for member variable

First question on SO and it's a real RTM candidate. But I promise you I've looked and can't seem to …

php syntax variables curly-braces
Syntax Error: Not a Chance

I tried executed the following code in the python IDLE from __future__ import braces And I got the following error: …

python syntax-error curly-braces
How to make eclipse automatically add braces to an IF statement?

In Java the following is completely valid: if (x == null) Y(); else Z(); I personally don't like it at all. …

java eclipse curly-braces
Do curly braces inside json string objects need to be escaped?

This string is part a JSON object/file: "Mask" : "{0}(CASE WHEN {1} = {2} THEN {3} ELSE 0 END) {4}" Will JSON recognize that as part …

json escaping curly-braces
Why enclose blocks of C code in curly braces?

I am looking at some C code, and have noticed it is full of these curly braces surrounding blocks of …

c scope curly-braces
What is the meaning of the ${0##...} syntax with variable, braces and hash character in bash?

I just saw some code in bash that I didn't quite understand. Being the newbie bash scripter, I'm not sure …

bash variables syntax curly-braces