Logics Kill

The action destroys a root logical AND or OR statement. To do this, first select the line containing the if-statement with the complex logical expression and then invoke the action by menu or shortcut key <K>. If expression is built from more than two logical components, only the root one will be destroyed. This action is opposite to the action Logics+.

Example 1:

Before:
    if (expr_1 && expr_2) goto label_2;
    expr_3;
label_2:
    expr_4;

After:
    if (!expr_1) goto label_1;
    if (expr_2) goto label_2;
label_1:
    expr_3;
label_2:
    expr_4;


Example 2:
Before:
    if (expr_1 || expr_2)
        expr_3;
    expr_4;

After:
    if (expr_1) goto label_1;
    if (expr_2)
    {
label_1:
        expr_3;
    }
    expr_4;


Example 3:
Before:
    if (expr_1 && expr_2) goto label_1;
    expr_3;
label_1:
    expr_4;
After:
    if (expr_1)
        if (expr_2) goto label_1;
    expr_3;
label_1:
    expr_4;



Example 4:
Before:
    if (expr_1 && expr_2)
        expr_3;
   
expr_4;
After:
    if (!expr_1) goto label_1;
    if (expr_2)
        expr_3;
label_1:
   
expr_4;