Code Blocks using { }

ac246

New Member
Hi, i am trying to learn how to use the { and } symbols to make my code look a lot neater.

i tried putting the following but it comes upwith a syntax error when compiling

Code:
{Block1:
Code here
Return
}
i would like it to have looked like.. (when blocks collapsed)

Code:
+ Block1:
+ Block2:
+ Block3:
But it comes up with an error so i am having to change it to
Code:
Block1:
{
Code here
Return
}
this gives me
Code:
Block1:
+ Unnamed Region
Block2:
+ Unnamed Region
Block3:
+ Unnamed Region
does anyone know how to name a region or is there any other way of making it look like in my second code block so it just shows the sub name?

Many Thanks
Aaron
 

Technical

Technical Support
Staff member
{ has been replaced by #region in PE6

#region "This is the more code area"
more code
more code
#endregion
 

fernando_g

Senior Member
Is the purpose of this function only cosmetic? (to hide large chunks of code and make it easier to read)
?
 
Top