I know {} are used to separate entities such as functions, classes and conditional branching, but what other use would they have here?
#import <stdio.h>
int main(void) {
{{{
printf("main\n");
}}}
return 0;
}
EDIT:
I found that it may be useful primarily for information hiding, along with nested functions. From the answers below it would seem they can be used as a marker during debugging and be removed in the release, but that this should not be endorsed.
Enclosing a code in braces
{}creates an Scope.Creating an local scope can have number of reasons like:
Creating variables anywhere except at the start of an scope was not allowed in c89, but it is allowed since c99.
Online Example Code Sample:
In your example code,
the extra
{&}do not serve any purpose, they are just redundant code.As @Martin suggests in comments, since enclosing code in
{{{&}}}is just similar to{&}, it might be used as an tag/pattern for easy search.However, Personally, I would prefer adding appropriate comment to the code with an keyword which would show up in search rather than add such redundant code.