Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>if if statement</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
if                       if Statement

     if (expression)
          statement1;
     [else
          statement2;]

      Notes:    The parentheses are required around expression.

                Statement1 is executed when expression is TRUE (non
                zero).

  -------------------------------- Example ---------------------------------

           if (i < 4)
               process(SMALL);

           if (i < 4)
               process(SMALL);
           else if (i < 10)
               process(MEDIUM);

    An `else' always belongs to the most recent `if', so the second
    `else' in this next example--else process(LARGE)--belongs to:
    if (i < 10).

           if (i < 4)
               process(SMALL);
           else if (i < 10)
               process(MEDIUM);
           else
               process(LARGE);

See Also: else

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson