Close Brace

Close Brace


  • Alternatively referred to as an open brace, close brace, and squiggly brackets, curly brackets are found on the same keys as the open bracket ( ) and close bracket ( ) on US keyboards.

    How to create an open and close curly bracket

  • Creating the "{" and "}" symbols on a U.S. keyboard

  • On English keyboards, the open bracket and close bracket are on the same key as the square bracket keys close to the Enter key. To get a curly bracket, press and hold the Shift key and then press the curly bracket keys.

    Creating the "{" and "}" symbol on a smartphone or tablet

  • To create an open and close bracket a smartphone or tablet, open the keyboard, go into the numbers (123), then (#+=) or symbols (sym), and tap on the '{' or '}' symbol.

    How are curly brackets used?

  • These keys are most commonly used in curly bracket programming languages such as C, Java, Perl, and PHP to enclose groups of statements or for a block of code. Below is an example of how an enclosed statement looks like in Perl.

    $value = 0;
    do {
    $value++;
    if ($value >= 10) {
    print "Value is equal to or greater than 10. Ending.";
    exit;
    }
    } until ($value >= 100);

  • In the above example, are two enclosed statements using curly brackets. The first group is the do loop that continues to increase the value of $value variable up to 100. Within that group is the if statement for checking if $value is greater than or equal to 10. Once $value is greater than or equal to 10, it prints a message and exits.


    What is an Operating System? » Computer Shortcut Keys and their Functions » Keyboard Function
    Keys
    » Computer Basics - Hardware - Software - Parts

    Short Stories for Kids - Moral Stories – English Short Stories for Children - Moral Stories for Kids - Stories for Kids - Funny Story for Kids - Scary Stories for Kids - Really Funny Short Stories - Bedtime Stories
    Proverb Stories
    Powerful Motivational Quotes for Students » Success Quotes » English Short Stories for Kids

    Cabin Crew Jobs & Career Advice » Secretary Job Description » Receptionist Job Description » Top 100 Interview Questions and Answers » How to Prepare for an Interview » How to Write a CV » How to Choose a Career » Computer Shortcut Keys and their Functions

    Scholarships in Australia » Scholarships in Austria » Scholarships in Belgium » Scholarships in Canada » Scholarships in Germany » Scholarships in Ireland » Scholarships in Italy » Scholarships in Japan » Scholarships in Korea » Scholarships in Netherlands » Scholarships in Switzerland » Scholarships in UK » Scholarships in USA

    Scholarships for Study in Africa » Scholarships for African Students » Undergraduate Scholarships » African Women Scholarships & Grants Scholarships for Study in Africa » Scholarships for African Students » Undergraduate Scholarships » African Women Scholarships & Grants Scholarships for Study in Africa » Scholarships for African Students » Undergraduate Scholarships » African Women Scholarships & Grants Short Stories for Kids - Moral Stories – English Short Stories for Children - Moral Stories for Kids - Stories for Kids - Funny Story for Kids - Scary Stories for Kids - Really Funny Short Stories - Bedtime Stories
    Proverb Stories
    Powerful Motivational Quotes for Students » Success Quotes »Scholarships in UK » Scholarships in USA Scholarships in UK » Scholarships in USA Scholarships in UK » Scholarships in USA Scholarships in UK »

  • Click here to post comments

    Join in and write your own page! It's easy to do. How? Simply click here to return to Computer Basics FAQ.