Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4605112
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:23:16+00:00 2026-05-22T00:23:16+00:00

Important note : this question is not about the superiority of a bracing style

  • 0

Important note: this question is not about the superiority of a bracing style above another. I am currently switching styles in order to evaluate for myself which one I think works best in my situation, and I like Allman as much as 1TBS.

Users of 1TBS bracing style, how do you format long conditions in an if statement and the subsequent code?

if ((this_is_the_first_part_of_a_long_condition)
    && (the_second_part_is_shorter__wait_no_it_is_not)
    && (and_one_more_for_the_road)) {
    here_comes_the_block_code();
}

I feel that there must be a better way. My current way is to add an empty line before the first line of the code block. Allman does not look very good in this case either, although more readable in my opinion.

Another example with for loops:

for (int relevant_counter_variable_name = START_VALUE;
    intelligent_expression_that_may_include_the_counter_variable;
    relevant_counter_variable_update) {
    first_code_line_inside_the_block();
}

Not so nice…

KNF (8 spaces indent) would help here, but I would like to avoid that. I have a couple other options, but I’d like to hear if there is some kind of standard way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T00:23:17+00:00Added an answer on May 22, 2026 at 12:23 am
    if (
        (this_is_the_first_part_of_a_long_condition)
        && (the_second_part_is_shorter__wait_no_it_is_not)
        && (and_one_more_for_the_road)
    ) {
        here_comes_the_block_code();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Screenshot Important Note : This application does not support Internet Explorer. I will be
Important: This question isn't actually really an ASP.NET question. Anyone who knows anything about
According to this : It is important to note that this is very different
Important : Please see this very much related question: Return multiple values in C++
this question is Basic but important. i need to rewrite php url using .htaccess
I asked a question about this a few months back , and I thought
I have read on MSDN( see Important note ) that RSACryptoServiceProvider must be disposed.
We all know that having a good note taking tool is important as a
Adding support for Unicode passwords it an important feature that should not be ignored
I have been gathering information in this site and others about the best way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.